mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-02 19:39:45 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -23,8 +23,6 @@ use Chill\PersonBundle\Entity\Person;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
use function in_array;
|
||||
|
||||
class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface
|
||||
{
|
||||
/**
|
||||
@@ -103,7 +101,7 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
|
||||
final public const TOGGLE_INTENSITY = 'CHILL_PERSON_ACCOMPANYING_PERIOD_TOGGLE_INTENSITY';
|
||||
|
||||
/**
|
||||
* Right to see confidential period even if not referrer
|
||||
* Right to see confidential period even if not referrer.
|
||||
*/
|
||||
final public const SEE_CONFIDENTIAL_ALL = 'CHILL_PERSON_ACCOMPANYING_PERIOD_SEE_CONFIDENTIAL';
|
||||
|
||||
@@ -162,7 +160,7 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
|
||||
|
||||
if ($subject instanceof AccompanyingPeriod) {
|
||||
if (AccompanyingPeriod::STEP_CLOSED === $subject->getStep()) {
|
||||
if (in_array($attribute, [self::EDIT, self::DELETE], true)) {
|
||||
if (\in_array($attribute, [self::EDIT, self::DELETE], true)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -183,7 +181,7 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
|
||||
return false;
|
||||
}
|
||||
|
||||
if (in_array($attribute, [
|
||||
if (\in_array($attribute, [
|
||||
self::SEE, self::SEE_DETAILS, self::EDIT,
|
||||
], true)) {
|
||||
if ($subject->getUser() === $token->getUser()) {
|
||||
|
Reference in New Issue
Block a user