Skip to content

Commit

Permalink
Applied php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
ptomulik committed Jun 4, 2020
1 parent 82545e9 commit ac672fb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
16 changes: 8 additions & 8 deletions src/Framework/Constraint/Connective.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,14 @@ final protected function constraints(): array
return $this->constraints;
}

/**
* Returns true if the $constraint needs to be wrapped with braces.
*/
final protected function constraintNeedsParentheses(Constraint $constraint): bool
{
return $this->arity() > 1 && parent::constraintNeedsParentheses($constraint);
}

/**
* Returns string representation of given operand in context of this operator
*
Expand All @@ -106,12 +114,4 @@ private function constraintToString(Constraint $constraint, int $position): stri

return $prefix . ($string ?? $constraint->toString());
}

/**
* Returns true if the $constraint needs to be wrapped with braces.
*/
final protected function constraintNeedsParentheses(Constraint $constraint): bool
{
return $this->arity() > 1 && parent::constraintNeedsParentheses($constraint);
}
}
2 changes: 0 additions & 2 deletions tests/unit/Framework/Constraint/LogicalNotTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public function testLogicalNotOfLogicalOrToString(): void
];

$constraints = \array_map(static function (string $name): \NamedConstraint {

return \NamedConstraint::fromName($name);
}, $names);

Expand Down Expand Up @@ -104,7 +103,6 @@ public function testLogicalNotOfLogicalAndToString(): void
];

$constraints = \array_map(static function (string $name): \NamedConstraint {

return \NamedConstraint::fromName($name);
}, $names);

Expand Down

0 comments on commit ac672fb

Please sign in to comment.