cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -1,13 +1,20 @@
<?php
/**
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\PersonBundle\Validator\Constraints\AccompanyingPeriod;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Templating\Entity\PersonRender;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
use Symfony\Component\Validator\Exception\UnexpectedValueException;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
use Chill\PersonBundle\Templating\Entity\PersonRender;
class LocationValidityValidator extends ConstraintValidator
{
@@ -30,25 +37,24 @@ class LocationValidityValidator extends ConstraintValidator
if ($period->getLocationStatus() === 'person') {
if (null === $period->getOpenParticipationContainsPerson(
$period->getPersonLocation())) {
$period->getPersonLocation()
)) {
$this->context->buildViolation($constraint->messagePersonLocatedMustBeAssociated)
->setParameter('{{ person_name }}', $this->render->renderString(
$period->getPersonLocation(), []
))
->addViolation()
;
->setParameter('{{ person_name }}', $this->render->renderString(
$period->getPersonLocation(),
[]
))
->addViolation();
}
}
if ($period->getStep() !== AccompanyingPeriod::STEP_DRAFT
&& $period->getLocationStatus() === 'none') {
$this->context
->buildViolation(
$constraint->messagePeriodMustRemainsLocated
)
->addViolation()
;
->buildViolation(
$constraint->messagePeriodMustRemainsLocated
)
->addViolation();
}
}
}