apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -18,7 +18,6 @@ use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
use Symfony\Component\Validator\Exception\UnexpectedValueException;
use Symfony\Component\Workflow\WorkflowInterface;
use function count;
class EntityWorkflowCreationValidator extends \Symfony\Component\Validator\ConstraintValidator
{
@@ -55,7 +54,7 @@ class EntityWorkflowCreationValidator extends \Symfony\Component\Validator\Const
$matched = array_filter($workflows, static fn (WorkflowInterface $workflow) => $workflow->getName() === $value->getWorkflowName());
if (0 === count($matched)) {
if (0 === \count($matched)) {
$this->context->buildViolation($constraint->messageWorkflowNotAvailable)
->addViolation();
}

View File

@@ -16,7 +16,6 @@ use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
use Symfony\Component\Validator\Exception\UnexpectedValueException;
use function count;
class StepDestValidValidator extends ConstraintValidator
{
@@ -35,12 +34,12 @@ class StepDestValidValidator extends ConstraintValidator
throw new UnexpectedValueException($value, EntityWorkflowStep::class);
}
if ($value->isFinal() && 0 < count($value->getDestUser())) {
if ($value->isFinal() && 0 < \count($value->getDestUser())) {
$this->context->buildViolation($constraint->messageDestNotAllowed)
->addViolation();
}
if (!$value->isFinal() && 0 === count($value->getDestUser())) {
if (!$value->isFinal() && 0 === \count($value->getDestUser())) {
$this->context->buildViolation($constraint->messageRequireDest)
->addViolation();
}