mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-11-10 06:08:25 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user