mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 13:03:50 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user