mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
fix cs
This commit is contained in:
parent
c2a132a40b
commit
68d0c66402
@ -344,7 +344,7 @@ final class AccompanyingCourseApiController extends ApiController
|
||||
if ($request->getMethod() === 'POST') {
|
||||
$this->denyAccessUnlessGranted(AccompanyingPeriodVoter::TOGGLE_INTENSITY, $accompanyingCourse);
|
||||
|
||||
$status = $accompanyingCourse->getIntensity() == 'regular' ? 'occasional' : 'regular';
|
||||
$status = $accompanyingCourse->getIntensity() === 'regular' ? 'occasional' : 'regular';
|
||||
$accompanyingCourse->setIntensity($status);
|
||||
$this->getDoctrine()->getManager()->flush();
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
|
||||
self::DELETE,
|
||||
self::FULL,
|
||||
self::TOGGLE_CONFIDENTIAL_ALL,
|
||||
self::TOGGLE_INTENSITY
|
||||
self::TOGGLE_INTENSITY,
|
||||
];
|
||||
|
||||
public const CREATE = 'CHILL_PERSON_ACCOMPANYING_PERIOD_CREATE';
|
||||
@ -62,10 +62,10 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
|
||||
* Right to toggle confidentiality.
|
||||
*/
|
||||
public const TOGGLE_CONFIDENTIAL_ALL = 'CHILL_PERSON_ACCOMPANYING_PERIOD_TOGGLE_CONFIDENTIAL_ALL';
|
||||
|
||||
/**
|
||||
* Right to toggle urgency of parcours.
|
||||
*/
|
||||
|
||||
public const TOGGLE_INTENSITY = 'CHILL_PERSON_ACCOMPANYING_PERIOD_TOGGLE_INTENSITY';
|
||||
|
||||
private Security $security;
|
||||
|
@ -62,7 +62,6 @@ class AccompanyingPeriodWorkVoter extends Voter
|
||||
case self::UPDATE:
|
||||
return $this->security->isGranted(AccompanyingPeriodVoter::EDIT, $subject->getAccompanyingPeriod());
|
||||
|
||||
|
||||
default:
|
||||
throw new UnexpectedValueException("attribute {$attribute} is not supported");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user