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

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