mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
cs: Fix code-style (using PHPCSFixer and PHPCS).
This commit is contained in:
@@ -19,6 +19,7 @@ use Symfony\Component\Validator\Constraint;
|
||||
use Symfony\Component\Validator\ConstraintValidator;
|
||||
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
use Symfony\Component\Validator\Exception\UnexpectedValueException;
|
||||
|
||||
use function in_array;
|
||||
|
||||
class AccompanyingPeriodValidityValidator extends ConstraintValidator
|
||||
@@ -68,7 +69,9 @@ class AccompanyingPeriodValidityValidator extends ConstraintValidator
|
||||
$periodIssuesWithAncestors = array_merge(
|
||||
$periodIssuesWithAncestors,
|
||||
array_map(
|
||||
static function (SocialIssue $si) { return $si->getId(); },
|
||||
static function (SocialIssue $si) {
|
||||
return $si->getId();
|
||||
},
|
||||
$si->getAncestors(true)
|
||||
)
|
||||
);
|
||||
|
@@ -38,9 +38,11 @@ class LocationValidityValidator extends ConstraintValidator
|
||||
}
|
||||
|
||||
if ($period->getLocationStatus() === 'person') {
|
||||
if (null === $period->getOpenParticipationContainsPerson(
|
||||
$period->getPersonLocation()
|
||||
)) {
|
||||
if (
|
||||
null === $period->getOpenParticipationContainsPerson(
|
||||
$period->getPersonLocation()
|
||||
)
|
||||
) {
|
||||
$this->context->buildViolation($constraint->messagePersonLocatedMustBeAssociated)
|
||||
->setParameter('{{ person_name }}', $this->render->renderString(
|
||||
$period->getPersonLocation(),
|
||||
@@ -50,8 +52,10 @@ class LocationValidityValidator extends ConstraintValidator
|
||||
}
|
||||
}
|
||||
|
||||
if ($period->getStep() !== AccompanyingPeriod::STEP_DRAFT
|
||||
&& $period->getLocationStatus() === 'none') {
|
||||
if (
|
||||
$period->getStep() !== AccompanyingPeriod::STEP_DRAFT
|
||||
&& $period->getLocationStatus() === 'none'
|
||||
) {
|
||||
$this->context
|
||||
->buildViolation(
|
||||
$constraint->messagePeriodMustRemainsLocated
|
||||
|
@@ -19,6 +19,7 @@ use Doctrine\Common\Collections\Collection;
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
use Symfony\Component\Validator\ConstraintValidator;
|
||||
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
|
||||
use function count;
|
||||
|
||||
class ParticipationOverlapValidator extends ConstraintValidator
|
||||
|
@@ -18,6 +18,7 @@ use Doctrine\Common\Collections\Collection;
|
||||
use Symfony\Component\Form\Exception\UnexpectedTypeException;
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
use Symfony\Component\Validator\ConstraintValidator;
|
||||
|
||||
use function count;
|
||||
use function in_array;
|
||||
|
||||
|
@@ -17,6 +17,7 @@ use Chill\PersonBundle\Templating\Entity\PersonRender;
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
use Symfony\Component\Validator\ConstraintValidator;
|
||||
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
|
||||
use function count;
|
||||
|
||||
/**
|
||||
|
@@ -16,6 +16,7 @@ use DateTime;
|
||||
use LogicException;
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
use Symfony\Component\Validator\ConstraintValidator;
|
||||
|
||||
use function get_class;
|
||||
use function gettype;
|
||||
use function is_object;
|
||||
|
Reference in New Issue
Block a user