mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Add grouping parenthesis on condition about social issue and social action visibility
This improve readability and avoid errors with boolean operator precedence
This commit is contained in:
parent
574ad42a76
commit
13854e59de
@ -292,8 +292,10 @@ class ActivityType
|
|||||||
{
|
{
|
||||||
if ($this->socialIssuesVisible !== $this->socialActionsVisible) {
|
if ($this->socialIssuesVisible !== $this->socialActionsVisible) {
|
||||||
// if social issues are invisible then social actions cannot be optional or required + if social issues are optional then social actions shouldn't be required
|
// if social issues are invisible then social actions cannot be optional or required + if social issues are optional then social actions shouldn't be required
|
||||||
if (0 === $this->socialIssuesVisible && (1 === $this->socialActionsVisible || 2 === $this->socialActionsVisible)
|
if (
|
||||||
|| (1 === $this->socialIssuesVisible && 2 === $this->socialActionsVisible)) {
|
(0 === $this->socialIssuesVisible && (1 === $this->socialActionsVisible || 2 === $this->socialActionsVisible))
|
||||||
|
|| (1 === $this->socialIssuesVisible && 2 === $this->socialActionsVisible)
|
||||||
|
) {
|
||||||
$context
|
$context
|
||||||
->buildViolation('The socialActionsVisible value is not compatible with the socialIssuesVisible value')
|
->buildViolation('The socialActionsVisible value is not compatible with the socialIssuesVisible value')
|
||||||
->atPath('socialActionsVisible')
|
->atPath('socialActionsVisible')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user