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

@@ -25,11 +25,9 @@ use Chill\PersonBundle\Repository\PersonRepository;
use Chill\PersonBundle\Search\SimilarPersonMatcher;
use Chill\TaskBundle\Entity\SingleTask;
use http\Exception\InvalidArgumentException;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Contracts\Translation\TranslatorInterface;
use function count;
class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController
@@ -52,8 +50,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
$person2->counters = $this->_getCounters($person2_id);
if (null === $person1) {
throw $this->createNotFoundException("Person with id {$person1_id} not"
. ' found on this server');
throw $this->createNotFoundException("Person with id {$person1_id} not".' found on this server');
}
$this->denyAccessUnlessGranted(
@@ -63,8 +60,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
);
if (null === $person2) {
throw $this->createNotFoundException("Person with id {$person2_id} not"
. ' found on this server');
throw $this->createNotFoundException("Person with id {$person2_id} not".' found on this server');
}
$form = $this->createForm(PersonConfimDuplicateType::class);
@@ -109,8 +105,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
$person = $this->_getPerson($person_id);
if (null === $person) {
throw $this->createNotFoundException("Person with id {$person_id} not"
. ' found on this server');
throw $this->createNotFoundException("Person with id {$person_id} not".' found on this server');
}
$this->denyAccessUnlessGranted(
@@ -127,8 +122,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
$person2 = $form->get('person')->getData();
if (null === $person2) {
throw $this->createNotFoundException("Person with id {$person2->getId}() not"
. ' found on this server');
throw $this->createNotFoundException("Person with id {$person2->getId}() not".' found on this server');
}
$direction = $form->get('direction')->getData();
@@ -215,8 +209,7 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
$person = $this->_getPerson($person_id);
if (null === $person) {
throw $this->createNotFoundException("Person with id {$person_id} not"
. ' found on this server');
throw $this->createNotFoundException("Person with id {$person_id} not".' found on this server');
}
$this->denyAccessUnlessGranted(
@@ -248,11 +241,11 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
$person = $em->getRepository(Person::class)->findOneBy(['id' => $id]);
return [
'nb_activity' => count($nb_activity),
'nb_document' => count($nb_document),
'nb_activity' => \count($nb_activity),
'nb_document' => \count($nb_document),
// 'nb_event' => count($nb_event),
'nb_task' => $nb_task,
'nb_addresses' => count($person->getAddresses()),
'nb_addresses' => \count($person->getAddresses()),
];
}
@@ -279,13 +272,11 @@ class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controll
}
if (null === $person1) {
throw $this->createNotFoundException("Person with id {$person1_id} not"
. ' found on this server');
throw $this->createNotFoundException("Person with id {$person1_id} not".' found on this server');
}
if (null === $person2) {
throw $this->createNotFoundException("Person with id {$person2_id} not"
. ' found on this server');
throw $this->createNotFoundException("Person with id {$person2_id} not".' found on this server');
}
return [$person1, $person2];