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

@@ -19,8 +19,6 @@ use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Validator\Validator\ValidatorInterface;
use function count;
/**
* Class PersonAddressController
* Controller for addresses associated with person.
@@ -50,8 +48,7 @@ class PersonAddressController extends AbstractController
->find($person_id);
if (null === $person) {
throw $this->createNotFoundException("Person with id {$person_id} not"
. ' found ');
throw $this->createNotFoundException("Person with id {$person_id} not".' found ');
}
$this->denyAccessUnlessGranted(
@@ -70,7 +67,7 @@ class PersonAddressController extends AbstractController
if ($form->isSubmitted() && $form->isValid()) {
$validatePersonErrors = $this->validatePerson($person);
if (count($validatePersonErrors) !== 0) {
if (0 !== \count($validatePersonErrors)) {
foreach ($validatePersonErrors as $error) {
$this->addFlash('error', $error->getMessage());
}
@@ -108,8 +105,7 @@ class PersonAddressController extends AbstractController
->find($person_id);
if (null === $person) {
throw $this->createNotFoundException("Person with id {$person_id} not"
. ' found ');
throw $this->createNotFoundException("Person with id {$person_id} not".' found ');
}
$this->denyAccessUnlessGranted(
@@ -139,8 +135,7 @@ class PersonAddressController extends AbstractController
->find($person_id);
if (null === $person) {
throw $this->createNotFoundException("Person with id {$person_id} not"
. ' found ');
throw $this->createNotFoundException("Person with id {$person_id} not".' found ');
}
$this->denyAccessUnlessGranted(
@@ -164,8 +159,7 @@ class PersonAddressController extends AbstractController
->find($person_id);
if (null === $person) {
throw $this->createNotFoundException("Person with id {$person_id} not"
. ' found ');
throw $this->createNotFoundException("Person with id {$person_id} not".' found ');
}
$this->denyAccessUnlessGranted(
@@ -194,8 +188,7 @@ class PersonAddressController extends AbstractController
->find($person_id);
if (null === $person) {
throw $this->createNotFoundException("Person with id {$person_id} not"
. ' found ');
throw $this->createNotFoundException("Person with id {$person_id} not".' found ');
}
$this->denyAccessUnlessGranted(
@@ -212,7 +205,7 @@ class PersonAddressController extends AbstractController
if ($form->isSubmitted() && $form->isValid()) {
$validatePersonErrors = $this->validatePerson($person);
if (count($validatePersonErrors) !== 0) {
if (0 !== \count($validatePersonErrors)) {
foreach ($validatePersonErrors as $error) {
$this->addFlash('error', $error->getMessage());
}
@@ -284,9 +277,9 @@ class PersonAddressController extends AbstractController
/**
* @param int $address_id
*
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException if the address id does not exists or is not associated with given person
*
* @return Address
*
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException if the address id does not exists or is not associated with given person
*/
protected function findAddressById(Person $person, $address_id)
{