mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 03:23:48 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -32,7 +32,6 @@ namespace Chill\PersonBundle\Privacy;
|
||||
*/
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
|
||||
class AccompanyingPeriodPrivacyEvent extends \Symfony\Contracts\EventDispatcher\Event
|
||||
{
|
||||
|
@@ -32,9 +32,6 @@ namespace Chill\PersonBundle\Privacy;
|
||||
*/
|
||||
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use Symfony\Component\EventDispatcher\Event;
|
||||
|
||||
use function count;
|
||||
|
||||
/**
|
||||
* Class PrivacyEvent.
|
||||
@@ -89,6 +86,6 @@ class PrivacyEvent extends \Symfony\Contracts\EventDispatcher\Event
|
||||
*/
|
||||
public function hasPersons()
|
||||
{
|
||||
return count($this->persons) >= 1;
|
||||
return \count($this->persons) >= 1;
|
||||
}
|
||||
}
|
||||
|
@@ -36,8 +36,6 @@ use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||
|
||||
use function array_map;
|
||||
|
||||
class PrivacyEventSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
/**
|
||||
@@ -89,7 +87,7 @@ class PrivacyEventSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
$persons = [];
|
||||
|
||||
if ($event->hasPersons() === true) {
|
||||
if (true === $event->hasPersons()) {
|
||||
foreach ($event->getPersons() as $person) {
|
||||
$persons[] = $person->getId();
|
||||
}
|
||||
@@ -99,7 +97,7 @@ class PrivacyEventSubscriber implements EventSubscriberInterface
|
||||
$involved['person_id'] = $event->getPerson()->getId();
|
||||
|
||||
if ($event->hasPersons()) {
|
||||
$involved['persons'] = array_map(
|
||||
$involved['persons'] = \array_map(
|
||||
static fn (Person $p) => $p->getId(),
|
||||
$event->getPersons()
|
||||
);
|
||||
|
Reference in New Issue
Block a user