cs: Fix code-style (using PHPCSFixer and PHPCS).

This commit is contained in:
Pol Dellaiera
2021-12-21 10:59:23 +01:00
parent b7360955f7
commit 8401ce2656
280 changed files with 742 additions and 319 deletions

View File

@@ -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)
)
);

View File

@@ -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

View File

@@ -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

View File

@@ -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;

View File

@@ -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;
/**

View File

@@ -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;