apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -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
{

View File

@@ -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;
}
}

View File

@@ -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()
);