mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
stylefix
This commit is contained in:
@@ -459,6 +459,20 @@ class AccompanyingPeriod implements
|
||||
return end($periods) === $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Assert\Callback
|
||||
*/
|
||||
public function canUserBeNull(ExecutionContextInterface $context)
|
||||
{
|
||||
if ($this->getStep() === self::STEP_CONFIRMED && $this->isConfidential() === true) {
|
||||
if (!$this->getUser()) {
|
||||
$context->buildViolation('User cannot be null for an accompanying period that is confirmed and confidential')
|
||||
->atPath('user')
|
||||
->addViolation();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Close a participation for a person.
|
||||
*
|
||||
@@ -871,21 +885,6 @@ class AccompanyingPeriod implements
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @Assert\Callback
|
||||
*/
|
||||
public function canUserBeNull(ExecutionContextInterface $context)
|
||||
{
|
||||
if ($this->getStep() === self::STEP_CONFIRMED && $this->isConfidential() === true)
|
||||
{
|
||||
if (!$this->getUser()) {
|
||||
$context->buildViolation('User cannot be null for an accompanying period that is confirmed and confidential')
|
||||
->atPath('user')
|
||||
->addViolation();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function isEmergency(): bool
|
||||
{
|
||||
return $this->emergency;
|
||||
|
Reference in New Issue
Block a user