mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -28,8 +28,6 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||
use Symfony\Component\Serializer\Exception;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function count;
|
||||
|
||||
class HouseholdMemberController extends ApiController
|
||||
{
|
||||
public function __construct(private readonly UrlGeneratorInterface $generator, private readonly TranslatorInterface $translator, private readonly AccompanyingPeriodRepository $periodRepository) {}
|
||||
@@ -90,9 +88,8 @@ class HouseholdMemberController extends ApiController
|
||||
if ($request->query->has('persons')) {
|
||||
$ids = $request->query->get('persons', []);
|
||||
|
||||
if (0 === count($ids)) {
|
||||
throw new BadRequestHttpException('parameters persons in query ' .
|
||||
'is not an array or empty');
|
||||
if (0 === \count($ids)) {
|
||||
throw new BadRequestHttpException('parameters persons in query is not an array or empty');
|
||||
}
|
||||
|
||||
$persons = $em->getRepository(Person::class)
|
||||
@@ -181,7 +178,7 @@ class HouseholdMemberController extends ApiController
|
||||
//
|
||||
$errors = $editor->validate();
|
||||
|
||||
if (count($errors) > 0) {
|
||||
if (\count($errors) > 0) {
|
||||
return $this->json($errors, 422);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user