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

@@ -21,6 +21,7 @@ use DateTime;
use Doctrine\ORM\Mapping as ORM;
use RuntimeException;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
use function in_array;
/**
@@ -172,15 +173,19 @@ class Participation implements ArrayAccess, HasCenterInterface, HasScopeInterfac
return;
}
if ($this->getRole()->getType()->getId() !==
$this->getEvent()->getType()->getId()) {
if (
$this->getRole()->getType()->getId() !==
$this->getEvent()->getType()->getId()
) {
$context->buildViolation('The role is not allowed with this event type')
->atPath('role')
->addViolation();
}
if ($this->getStatus()->getType()->getId() !==
$this->getEvent()->getType()->getId()) {
if (
$this->getStatus()->getType()->getId() !==
$this->getEvent()->getType()->getId()
) {
$context->buildViolation('The status is not allowed with this event type')
->atPath('status')
->addViolation();