mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
cs: Fix code-style (using PHPCSFixer and PHPCS).
This commit is contained in:
@@ -23,6 +23,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
|
||||
use function trim;
|
||||
|
||||
final class AddressReferenceAPIController extends ApiController
|
||||
|
@@ -12,7 +12,6 @@ declare(strict_types=1);
|
||||
namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class AdminController extends AbstractController
|
||||
|
@@ -14,7 +14,6 @@ namespace Chill\MainBundle\Controller;
|
||||
use Chill\MainBundle\Entity\Center;
|
||||
use Chill\MainBundle\Form\CenterType;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
|
@@ -25,6 +25,7 @@ use Symfony\Component\Form\FormFactoryInterface;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Session\SessionInterface;
|
||||
use Symfony\Component\Translation\TranslatorInterface;
|
||||
|
||||
use function count;
|
||||
use function serialize;
|
||||
use function unserialize;
|
||||
@@ -484,11 +485,13 @@ class ExportController extends AbstractController
|
||||
$data = $form->getData();
|
||||
|
||||
// check ACL
|
||||
if ($exportManager->isGrantedForElement(
|
||||
$export,
|
||||
null,
|
||||
$exportManager->getPickedCenters($data['centers'])
|
||||
) === false) {
|
||||
if (
|
||||
$exportManager->isGrantedForElement(
|
||||
$export,
|
||||
null,
|
||||
$exportManager->getPickedCenters($data['centers'])
|
||||
) === false
|
||||
) {
|
||||
throw $this->createAccessDeniedException('you do not have '
|
||||
. 'access to this export for those centers');
|
||||
}
|
||||
|
@@ -18,6 +18,7 @@ use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||
|
||||
use function array_key_exists;
|
||||
use function json_decode;
|
||||
|
||||
|
@@ -26,6 +26,7 @@ use Symfony\Component\Security\Core\Role\Role;
|
||||
use Symfony\Component\Security\Core\Role\RoleHierarchy;
|
||||
use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function array_key_exists;
|
||||
|
||||
/**
|
||||
|
@@ -18,6 +18,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
use function array_map;
|
||||
|
||||
/**
|
||||
@@ -54,12 +55,12 @@ class PostalCodeController extends AbstractController
|
||||
->createQuery(
|
||||
sprintf(
|
||||
'SELECT p.id AS id, p.name AS name, p.code AS code, '
|
||||
. 'country.name AS country_name, '
|
||||
. 'country.countryCode AS country_code '
|
||||
. 'FROM %s p '
|
||||
. 'JOIN p.country country '
|
||||
. 'WHERE LOWER(p.name) LIKE LOWER(:pattern) OR LOWER(p.code) LIKE LOWER(:pattern) '
|
||||
. 'ORDER BY code',
|
||||
. 'country.name AS country_name, '
|
||||
. 'country.countryCode AS country_code '
|
||||
. 'FROM %s p '
|
||||
. 'JOIN p.country country '
|
||||
. 'WHERE LOWER(p.name) LIKE LOWER(:pattern) OR LOWER(p.code) LIKE LOWER(:pattern) '
|
||||
. 'ORDER BY code',
|
||||
PostalCode::class
|
||||
)
|
||||
)
|
||||
|
@@ -27,6 +27,7 @@ use Symfony\Component\HttpFoundation\JsonResponse;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
use function count;
|
||||
use function key;
|
||||
use function reset;
|
||||
|
@@ -17,6 +17,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
use function count;
|
||||
|
||||
class TimelineCenterController extends AbstractController
|
||||
|
Reference in New Issue
Block a user