cs: Fix code-style (using PHPCSFixer and PHPCS).

This commit is contained in:
Pol Dellaiera
2021-12-21 10:59:23 +01:00
parent b7360955f7
commit 8401ce2656
280 changed files with 742 additions and 319 deletions

View File

@@ -26,6 +26,7 @@ use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\Translation\TranslatorInterface;
use function array_merge;
final class ThirdPartyController extends CRUDController

View File

@@ -23,6 +23,7 @@ use Doctrine\Persistence\ObjectManager;
use Iterator;
use Nelmio\Alice\Loader\NativeLoader;
use Nelmio\Alice\ObjectSet;
use function array_map;
use function count;
@@ -76,7 +77,9 @@ class LoadThirdParty extends Fixture implements DependentFixtureInterface
private function getCenters(): Iterator
{
$references = array_map(
static function ($a) { return $a['ref']; },
static function ($a) {
return $a['ref'];
},
LoadCenters::$centers
);
$number = random_int(1, count($references));

View File

@@ -16,6 +16,7 @@ use LogicException;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
use function in_array;
/**

View File

@@ -28,6 +28,7 @@ use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
use UnexpectedValueException;
use function array_filter;
use function array_map;
use function array_merge;

View File

@@ -17,6 +17,7 @@ use RuntimeException;
use Symfony\Component\Form\ChoiceList\ArrayChoiceList;
use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
use Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface;
use function call_user_func;
use function in_array;

View File

@@ -36,6 +36,7 @@ use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use function array_key_exists;
class ThirdPartyType extends AbstractType

View File

@@ -23,6 +23,7 @@ use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
use Symfony\Component\Translation\TranslatorInterface;
use function array_diff;
use function array_merge;
use function count;

View File

@@ -19,6 +19,7 @@ use Symfony\Component\Form\Exception\UnexpectedTypeException;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Contracts\Translation\TranslatorInterface;
use function array_merge;
use function implode;
use function is_array;

View File

@@ -18,6 +18,7 @@ use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder;
use Doctrine\Persistence\ObjectRepository;
use DomainException;
use function array_key_exists;
final class ThirdPartyRepository implements ObjectRepository

View File

@@ -14,6 +14,7 @@ namespace Chill\ThirdPartyBundle\Search;
use Chill\MainBundle\Search\SearchApiInterface;
use Chill\MainBundle\Search\SearchApiQuery;
use Chill\ThirdPartyBundle\Repository\ThirdPartyRepository;
use function array_merge;
use function explode;
use function implode;

View File

@@ -18,6 +18,7 @@ use Chill\MainBundle\Security\ProvideRoleHierarchyInterface;
use Chill\ThirdPartyBundle\Entity\ThirdParty;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Role\Role;
use function array_intersect;
use function count;
use function in_array;