mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
apply rector rules
This commit is contained in:
@@ -129,8 +129,6 @@ abstract class AbstractCRUDController extends AbstractController
|
||||
*
|
||||
* By default, count all entities. You can customize the query by
|
||||
* using the method `customizeQuery`.
|
||||
*
|
||||
* @param mixed $_format
|
||||
*/
|
||||
protected function countEntities(string $action, Request $request, mixed $_format): int
|
||||
{
|
||||
|
@@ -218,7 +218,6 @@ class ApiController extends AbstractCRUDController
|
||||
* @param string $postedDataType the type of the posted data (the content)
|
||||
* @param string $postedDataContext a context to deserialize posted data (the content)
|
||||
* @param bool $forcePersist force to persist the created element (only for POST request)
|
||||
* @param mixed $id
|
||||
* @throw BadRequestException if unable to deserialize the posted data
|
||||
* @throw BadRequestException if the method is not POST or DELETE
|
||||
*/
|
||||
@@ -337,9 +336,6 @@ class ApiController extends AbstractCRUDController
|
||||
* 4. launch `onPostCheckACL`. If the result is an instance of Response,
|
||||
* this response is returned ;
|
||||
* 5. Serialize the entity and return the result. The serialization context is given by `getSerializationContext`
|
||||
*
|
||||
* @param mixed $id
|
||||
* @param mixed $_format
|
||||
*/
|
||||
protected function entityGet(string $action, Request $request, mixed $id, mixed $_format = 'html'): Response
|
||||
{
|
||||
@@ -451,8 +447,6 @@ class ApiController extends AbstractCRUDController
|
||||
* PATCH, PUT, or POST method).
|
||||
*
|
||||
* This is called **after** the entity was altered.
|
||||
*
|
||||
* @param mixed $entity
|
||||
*/
|
||||
protected function getContextForSerializationPostAlter(string $action, Request $request, string $_format, mixed $entity, array $more = []): array
|
||||
{
|
||||
@@ -489,7 +483,6 @@ class ApiController extends AbstractCRUDController
|
||||
* 4. Serialize the entities in a Collection, using `SerializeCollection`
|
||||
*
|
||||
* @param string $action
|
||||
* @param mixed $_format
|
||||
*/
|
||||
protected function indexApiAction($action, Request $request, mixed $_format)
|
||||
{
|
||||
|
@@ -59,8 +59,6 @@ class CRUDController extends AbstractController
|
||||
* BAse method for edit action.
|
||||
*
|
||||
* IMplemented by the method formEditAction, with action as 'edit'
|
||||
*
|
||||
* @param mixed $id
|
||||
*/
|
||||
public function edit(Request $request, mixed $id): Response
|
||||
{
|
||||
@@ -120,8 +118,6 @@ class CRUDController extends AbstractController
|
||||
* Base method for the view action.
|
||||
*
|
||||
* Implemented by the method viewAction, with action as 'view'
|
||||
*
|
||||
* @param mixed $id
|
||||
*/
|
||||
public function view(Request $request, mixed $id): Response
|
||||
{
|
||||
@@ -182,7 +178,6 @@ class CRUDController extends AbstractController
|
||||
* Throw an \Symfony\Component\Security\Core\Exception\AccessDeniedHttpException
|
||||
* if not accessible.
|
||||
*
|
||||
* @param mixed $entity
|
||||
*
|
||||
* @throws \Symfony\Component\Security\Core\Exception\AccessDeniedHttpException
|
||||
*/
|
||||
@@ -223,7 +218,6 @@ class CRUDController extends AbstractController
|
||||
* It is preferable to override customizeForm instead of overriding
|
||||
* this method.
|
||||
*
|
||||
* @param mixed $entity
|
||||
* @param string $formClass
|
||||
*/
|
||||
protected function createFormFor(string $action, mixed $entity, ?string $formClass = null, array $formOptions = []): FormInterface
|
||||
@@ -484,9 +478,7 @@ class CRUDController extends AbstractController
|
||||
* 6. Launch rendering, the parameter is fetch using `getTemplateFor`
|
||||
* The parameters may be personnalized using `generateTemplateParameter`.
|
||||
*
|
||||
* @param mixed $id
|
||||
* @param string $formClass
|
||||
*
|
||||
* @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
|
||||
*/
|
||||
protected function formEditAction(string $action, Request $request, mixed $id, ?string $formClass = null, array $formOptions = []): Response
|
||||
@@ -877,7 +869,6 @@ class CRUDController extends AbstractController
|
||||
* * save-and-new: return to new page of current crud ;
|
||||
* * save-and-view: return to view page of current crud ;
|
||||
*
|
||||
* @param mixed $entity
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
*/
|
||||
@@ -1050,9 +1041,6 @@ class CRUDController extends AbstractController
|
||||
* * `crud_name`: the crud name
|
||||
* 6. Launch rendering, the parameter is fetch using `getTemplateFor`
|
||||
* The parameters may be personnalized using `generateTemplateParameter`.
|
||||
*
|
||||
* @param mixed $id
|
||||
* @param mixed $_format
|
||||
*/
|
||||
protected function viewAction(string $action, Request $request, mixed $id, mixed $_format = 'html'): Response
|
||||
{
|
||||
|
@@ -64,17 +64,13 @@ class ChillUserSendRenewPasswordCodeCommand extends Command
|
||||
|
||||
/**
|
||||
* The current input interface.
|
||||
*
|
||||
* @var InputInterface
|
||||
*/
|
||||
private $input;
|
||||
private ?\Symfony\Component\Console\Input\InputInterface $input = null;
|
||||
|
||||
/**
|
||||
* The current output interface.
|
||||
*
|
||||
* @var OutputInterface
|
||||
*/
|
||||
private $output;
|
||||
private ?\Symfony\Component\Console\Output\OutputInterface $output = null;
|
||||
|
||||
public function __construct(
|
||||
LoggerInterface $logger,
|
||||
|
@@ -31,12 +31,12 @@ class LoadAndUpdateLanguagesCommand extends Command
|
||||
final public const INCLUDE_REGIONAL_VERSION = 'include_regional';
|
||||
|
||||
// Array of ancien languages (to exclude)
|
||||
private $ancientToExclude = ['ang', 'egy', 'fro', 'goh', 'grc', 'la', 'non', 'peo', 'pro', 'sga',
|
||||
private array $ancientToExclude = ['ang', 'egy', 'fro', 'goh', 'grc', 'la', 'non', 'peo', 'pro', 'sga',
|
||||
'dum', 'enm', 'frm', 'gmh', 'mga', 'akk', 'phn', 'zxx', 'got', 'und', ];
|
||||
|
||||
// The regional version of language are language with _ in the code
|
||||
// This array contains regional code to not exclude
|
||||
private $regionalVersionToInclude = ['ro_MD'];
|
||||
private array $regionalVersionToInclude = ['ro_MD'];
|
||||
|
||||
/**
|
||||
* LoadCountriesCommand constructor.
|
||||
@@ -84,7 +84,6 @@ class LoadAndUpdateLanguagesCommand extends Command
|
||||
{
|
||||
$em = $this->entityManager;
|
||||
$chillAvailableLanguages = $this->availableLanguages;
|
||||
$languageBundle = Intl::getLanguageBundle();
|
||||
$languages = [];
|
||||
|
||||
foreach ($chillAvailableLanguages as $avLang) {
|
||||
@@ -125,7 +124,7 @@ class LoadAndUpdateLanguagesCommand extends Command
|
||||
if ($langageDB) {
|
||||
$em->remove($langageDB);
|
||||
}
|
||||
echo 'Code excluded : ' . $code . ' - ' . \Symfony\Component\Intl\Languages::getName() . "\n";
|
||||
echo 'Code excluded : ' . $code . ' - ' . \Symfony\Component\Intl\Languages::getName('en_GB') . "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -26,10 +26,7 @@ class LoadAddressReferences extends AbstractFixture implements ContainerAwareInt
|
||||
{
|
||||
protected $faker;
|
||||
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
@@ -23,10 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
*/
|
||||
class LoadCountries extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
|
||||
|
||||
public function getOrder()
|
||||
{
|
||||
|
@@ -27,17 +27,14 @@ use function in_array;
|
||||
class LoadLanguages extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface
|
||||
{
|
||||
// Array of ancien languages (to exclude)
|
||||
private $ancientToExclude = ['ang', 'egy', 'fro', 'goh', 'grc', 'la', 'non', 'peo', 'pro', 'sga',
|
||||
private array $ancientToExclude = ['ang', 'egy', 'fro', 'goh', 'grc', 'la', 'non', 'peo', 'pro', 'sga',
|
||||
'dum', 'enm', 'frm', 'gmh', 'mga', 'akk', 'phn', 'zxx', 'got', 'und', ];
|
||||
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
|
||||
|
||||
// The regional version of language are language with _ in the code
|
||||
// This array contains regional code to not exclude
|
||||
private $regionalVersionToInclude = ['ro_MD'];
|
||||
private array $regionalVersionToInclude = ['ro_MD'];
|
||||
|
||||
public function getOrder()
|
||||
{
|
||||
@@ -78,7 +75,7 @@ class LoadLanguages extends AbstractFixture implements ContainerAwareInterface,
|
||||
$names = [];
|
||||
|
||||
foreach ($this->container->getParameter('chill_main.available_languages') as $lang) {
|
||||
$names[$lang] = \Symfony\Component\Intl\Languages::getName();
|
||||
$names[$lang] = \Symfony\Component\Intl\Languages::getName('en_GB');
|
||||
}
|
||||
|
||||
return $names;
|
||||
|
@@ -23,10 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
*/
|
||||
class LoadLocationType extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
|
||||
|
||||
public function getOrder()
|
||||
{
|
||||
|
@@ -28,7 +28,7 @@ class LoadPostalCodes extends AbstractFixture implements OrderedFixtureInterface
|
||||
{
|
||||
public static $refs = [];
|
||||
|
||||
private static $postalCodeBelgium = <<<'EOF'
|
||||
private static string $postalCodeBelgium = <<<'EOF'
|
||||
1000,BRUXELLES,BE
|
||||
1020,BRUXELLES,BE
|
||||
1030,SCHAERBEEK,BE
|
||||
@@ -63,7 +63,7 @@ class LoadPostalCodes extends AbstractFixture implements OrderedFixtureInterface
|
||||
1320,BEAUVECHAIN,BE
|
||||
EOF;
|
||||
|
||||
private static $postalCodeFrance = <<<'EOF'
|
||||
private static string $postalCodeFrance = <<<'EOF'
|
||||
85000,LA ROCHE SUR YON,FR,85191,46.6675261644,-1.4077954093,INSEE
|
||||
85000,MOUILLERON LE CAPTIF,FR,85155,46.7104764993,-1.46129661418,INSEE
|
||||
85100,LES SABLES D OLONNE,FR,85194,46.5007612799,-1.79255128677,INSEE
|
||||
|
@@ -56,10 +56,7 @@ class LoadUsers extends AbstractFixture implements ContainerAwareInterface, Orde
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
|
||||
|
||||
public function getOrder()
|
||||
{
|
||||
|
@@ -109,17 +109,15 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
|
||||
* cache of ordering by place.
|
||||
*
|
||||
* @internal used by function cacheAndGetOrdering
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $cacheOrdering = [];
|
||||
private array $cacheOrdering = [];
|
||||
|
||||
/**
|
||||
* @var WidgetFactoryInterface[]
|
||||
*/
|
||||
private $widgetFactories;
|
||||
private ?array $widgetFactories = null;
|
||||
|
||||
private $widgetServices = [];
|
||||
private array $widgetServices = [];
|
||||
|
||||
/**
|
||||
* process the configuration and the container to add the widget available.
|
||||
|
@@ -18,9 +18,9 @@ use Doctrine\ORM\Query\SqlWalker;
|
||||
|
||||
class Age extends FunctionNode
|
||||
{
|
||||
private $value1;
|
||||
private \Doctrine\ORM\Query\AST\ArithmeticTerm|\Doctrine\ORM\Query\AST\SimpleArithmeticExpression|null $value1 = null;
|
||||
|
||||
private $value2;
|
||||
private \Doctrine\ORM\Query\AST\ArithmeticTerm|\Doctrine\ORM\Query\AST\SimpleArithmeticExpression|null $value2 = null;
|
||||
|
||||
public function getSql(SqlWalker $sqlWalker)
|
||||
{
|
||||
|
@@ -29,7 +29,7 @@ class Extract extends FunctionNode
|
||||
{
|
||||
private string $field;
|
||||
|
||||
private $value;
|
||||
private \Doctrine\ORM\Query\AST\Node|string|null $value = null;
|
||||
//private PathExpression $value;
|
||||
//private FunctionNode $value;
|
||||
//private DateDiffFunction $value;
|
||||
|
@@ -18,9 +18,9 @@ use Doctrine\ORM\Query\SqlWalker;
|
||||
|
||||
class GetJsonFieldByKey extends FunctionNode
|
||||
{
|
||||
private $expr1;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $expr1 = null;
|
||||
|
||||
private $expr2;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $expr2 = null;
|
||||
|
||||
public function getSql(SqlWalker $sqlWalker)
|
||||
{
|
||||
|
@@ -24,7 +24,7 @@ use Doctrine\ORM\Query\SqlWalker;
|
||||
*/
|
||||
class JsonAggregate extends FunctionNode
|
||||
{
|
||||
private $expr;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $expr = null;
|
||||
|
||||
public function getSql(SqlWalker $sqlWalker)
|
||||
{
|
||||
|
@@ -18,9 +18,9 @@ use Doctrine\ORM\Query\SqlWalker;
|
||||
|
||||
class JsonExtract extends FunctionNode
|
||||
{
|
||||
private $element;
|
||||
private \Doctrine\ORM\Query\AST\Node|string|null $element = null;
|
||||
|
||||
private $keyToExtract;
|
||||
private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $keyToExtract = null;
|
||||
|
||||
public function getSql(SqlWalker $sqlWalker)
|
||||
{
|
||||
|
@@ -21,7 +21,7 @@ use Doctrine\ORM\Query\SqlWalker;
|
||||
*/
|
||||
class JsonbArrayLength extends FunctionNode
|
||||
{
|
||||
private $expr1;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $expr1 = null;
|
||||
|
||||
public function getSql(SqlWalker $sqlWalker): string
|
||||
{
|
||||
|
@@ -18,9 +18,9 @@ use Doctrine\ORM\Query\SqlWalker;
|
||||
|
||||
class JsonbExistsInArray extends FunctionNode
|
||||
{
|
||||
private $expr1;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $expr1 = null;
|
||||
|
||||
private $expr2;
|
||||
private ?\Doctrine\ORM\Query\AST\InputParameter $expr2 = null;
|
||||
|
||||
public function getSql(SqlWalker $sqlWalker): string
|
||||
{
|
||||
|
@@ -25,13 +25,13 @@ use Exception;
|
||||
*/
|
||||
class OverlapsI extends FunctionNode
|
||||
{
|
||||
private $firstPeriodEnd;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $firstPeriodEnd = null;
|
||||
|
||||
private $firstPeriodStart;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $firstPeriodStart = null;
|
||||
|
||||
private $secondPeriodEnd;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $secondPeriodEnd = null;
|
||||
|
||||
private $secondPeriodStart;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $secondPeriodStart = null;
|
||||
|
||||
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
|
||||
{
|
||||
|
@@ -19,9 +19,9 @@ use Doctrine\ORM\Query\Lexer;
|
||||
*/
|
||||
class STContains extends FunctionNode
|
||||
{
|
||||
private $firstPart;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $firstPart = null;
|
||||
|
||||
private $secondPart;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $secondPart = null;
|
||||
|
||||
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
|
||||
{
|
||||
|
@@ -18,7 +18,7 @@ use Doctrine\ORM\Query\SqlWalker;
|
||||
|
||||
class STX extends FunctionNode
|
||||
{
|
||||
private $field;
|
||||
private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $field = null;
|
||||
|
||||
public function getSql(SqlWalker $sqlWalker)
|
||||
{
|
||||
|
@@ -18,7 +18,7 @@ use Doctrine\ORM\Query\SqlWalker;
|
||||
|
||||
class STY extends FunctionNode
|
||||
{
|
||||
private $field;
|
||||
private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $field = null;
|
||||
|
||||
public function getSql(SqlWalker $sqlWalker)
|
||||
{
|
||||
|
@@ -16,9 +16,9 @@ use Doctrine\ORM\Query\Lexer;
|
||||
|
||||
class Similarity extends FunctionNode
|
||||
{
|
||||
private $firstPart;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $firstPart = null;
|
||||
|
||||
private $secondPart;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $secondPart = null;
|
||||
|
||||
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
|
||||
{
|
||||
|
@@ -17,9 +17,9 @@ use Doctrine\ORM\Query\SqlWalker;
|
||||
|
||||
class StrictWordSimilarityOPS extends \Doctrine\ORM\Query\AST\Functions\FunctionNode
|
||||
{
|
||||
private $firstPart;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $firstPart = null;
|
||||
|
||||
private $secondPart;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $secondPart = null;
|
||||
|
||||
public function getSql(SqlWalker $sqlWalker)
|
||||
{
|
||||
|
@@ -21,9 +21,9 @@ use Doctrine\ORM\Query\SqlWalker;
|
||||
*/
|
||||
class ToChar extends FunctionNode
|
||||
{
|
||||
private $datetime;
|
||||
private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $datetime = null;
|
||||
|
||||
private $fmt;
|
||||
private \Doctrine\ORM\Query\AST\Node|string|null $fmt = null;
|
||||
|
||||
public function getSql(SqlWalker $sqlWalker)
|
||||
{
|
||||
|
@@ -22,7 +22,7 @@ use Doctrine\ORM\Query\Lexer;
|
||||
*/
|
||||
class Unaccent extends FunctionNode
|
||||
{
|
||||
private $string;
|
||||
private ?\Doctrine\ORM\Query\AST\Node $string = null;
|
||||
|
||||
public function getSql(\Doctrine\ORM\Query\SqlWalker $sqlWalker)
|
||||
{
|
||||
|
@@ -25,10 +25,9 @@ class CommentEmbeddable
|
||||
private ?string $comment = null;
|
||||
|
||||
/**
|
||||
* @var DateTime
|
||||
* @ORM\Column(type="datetime", nullable=true)
|
||||
*/
|
||||
private $date;
|
||||
private ?\DateTime $date = null;
|
||||
|
||||
/**
|
||||
* Embeddable does not support associations.
|
||||
|
@@ -29,7 +29,7 @@ class PermissionsGroup
|
||||
*
|
||||
* @ORM\Column(type="json")
|
||||
*/
|
||||
private $flags = [];
|
||||
private array $flags = [];
|
||||
|
||||
/**
|
||||
* @var Collection<GroupCenter>
|
||||
|
@@ -53,12 +53,11 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
|
||||
private string $canonical = '';
|
||||
|
||||
/**
|
||||
* @var Point
|
||||
*
|
||||
* @ORM\Column(type="point", nullable=true)
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $center;
|
||||
private ?\Chill\MainBundle\Doctrine\Model\Point $center = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
@@ -69,12 +68,11 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
|
||||
private $code;
|
||||
|
||||
/**
|
||||
* @var Country
|
||||
*
|
||||
* @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Country")
|
||||
* @groups({"write", "read"})
|
||||
*/
|
||||
private $country;
|
||||
private ?\Chill\MainBundle\Entity\Country $country = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable", nullable=true, options={"default": null})
|
||||
@@ -100,28 +98,25 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
|
||||
private $name;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @ORM\Column(name="origin", type="integer", nullable=true)
|
||||
* @groups({"write", "read"})
|
||||
*/
|
||||
private $origin = 0;
|
||||
private int $origin = 0;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $postalCodeSource;
|
||||
private ?string $postalCodeSource = null;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @ORM\Column(type="string", length=255, nullable=true)
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private $refPostalCodeId;
|
||||
private ?string $refPostalCodeId = null;
|
||||
|
||||
public function getCenter(): ?Point
|
||||
{
|
||||
|
@@ -64,10 +64,7 @@ class ExportManager
|
||||
*/
|
||||
private array $formatters = [];
|
||||
|
||||
/**
|
||||
* @var \Symfony\Component\Security\Core\User\UserInterface
|
||||
*/
|
||||
private $user;
|
||||
private readonly string|\Stringable|\Symfony\Component\Security\Core\User\UserInterface $user;
|
||||
|
||||
public function __construct(
|
||||
private readonly LoggerInterface $logger,
|
||||
|
@@ -126,17 +126,13 @@ class SpreadSheetFormatter implements FormatterInterface
|
||||
* The array's keys are the keys in the raw result, and
|
||||
* values are the callable which will transform the raw result to
|
||||
* displayable result.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $cacheDisplayableResult;
|
||||
private ?array $cacheDisplayableResult = null;
|
||||
|
||||
/**
|
||||
* Whethe `cacheDisplayableResult` is initialized or not.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $cacheDisplayableResultIsInitialized = false;
|
||||
private bool $cacheDisplayableResultIsInitialized = false;
|
||||
|
||||
public function __construct(TranslatorInterface $translatorInterface, ExportManager $exportManager)
|
||||
{
|
||||
|
@@ -28,20 +28,17 @@ use function in_array;
|
||||
*/
|
||||
class ComposedRoleScopeType extends AbstractType
|
||||
{
|
||||
/**
|
||||
* @var RoleProvider
|
||||
*/
|
||||
private $roleProvider;
|
||||
private readonly \Chill\MainBundle\Security\RoleProvider $roleProvider;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private $roles = [];
|
||||
private array $roles = [];
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private $rolesWithoutScope = [];
|
||||
private array $rolesWithoutScope = [];
|
||||
|
||||
public function __construct(
|
||||
private readonly TranslatableStringHelper $translatableStringHelper,
|
||||
|
@@ -26,7 +26,7 @@ class TranslatableStringFormType extends AbstractType
|
||||
{
|
||||
// The langauges availaible
|
||||
|
||||
private $frameworkTranslatorFallback; // The langagues used for the translation
|
||||
private readonly array $frameworkTranslatorFallback; // The langagues used for the translation
|
||||
|
||||
public function __construct(private readonly array $availableLanguages, Translator $translator)
|
||||
{
|
||||
|
@@ -190,7 +190,7 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface
|
||||
'Type' => 'carrier',
|
||||
],
|
||||
]);
|
||||
} catch (ClientException $e) {
|
||||
} catch (ClientException) {
|
||||
return 'invalid';
|
||||
} catch (ServerException $e) {
|
||||
$response = $e->getResponse();
|
||||
|
@@ -22,17 +22,14 @@ use Twig\TwigFunction;
|
||||
*/
|
||||
class MenuTwig extends AbstractExtension implements ContainerAwareInterface
|
||||
{
|
||||
/**
|
||||
* @var \Symfony\Component\DependencyInjection\ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
|
||||
|
||||
/**
|
||||
* the default parameters for chillMenu.
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
private $defaultParams = [
|
||||
private array $defaultParams = [
|
||||
'layout' => '@ChillMain/Menu/defaultMenu.html.twig',
|
||||
'args' => [],
|
||||
'activeRouteKey' => null,
|
||||
|
@@ -35,19 +35,19 @@ class SearchProvider
|
||||
/**
|
||||
* @var HasAdvancedSearchFormInterface[]
|
||||
*/
|
||||
private $hasAdvancedFormSearchServices = [];
|
||||
private array $hasAdvancedFormSearchServices = [];
|
||||
|
||||
/**
|
||||
* store string which must be extracted to find default arguments.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
private $mustBeExtracted = [];
|
||||
private array $mustBeExtracted = [];
|
||||
|
||||
/**
|
||||
* @var SearchInterface[]
|
||||
*/
|
||||
private $searchServices = [];
|
||||
private array $searchServices = [];
|
||||
|
||||
public function addSearchService(SearchInterface $service, $name)
|
||||
{
|
||||
|
@@ -19,17 +19,15 @@ class RoleProvider
|
||||
/**
|
||||
* @var ProvideRoleInterface[]
|
||||
*/
|
||||
private $providers = [];
|
||||
private array $providers = [];
|
||||
|
||||
/**
|
||||
* an array where keys are the role, and value is the title
|
||||
* for the given role.
|
||||
*
|
||||
* Null when not initialized.
|
||||
*
|
||||
* @var array|null
|
||||
*/
|
||||
private $rolesTitlesCache;
|
||||
private ?array $rolesTitlesCache = null;
|
||||
|
||||
/**
|
||||
* Add a role provider.
|
||||
|
@@ -80,7 +80,6 @@ class WidgetRenderingTwig extends AbstractExtension
|
||||
*
|
||||
* @param string $place
|
||||
* @param WidgetInterface $widget
|
||||
* @param mixed $ordering
|
||||
*/
|
||||
public function addWidget($place, mixed $ordering, $widget, array $config = [])
|
||||
{
|
||||
|
@@ -286,10 +286,6 @@ abstract class AbstractExportTest extends WebTestCase
|
||||
* > 0).
|
||||
*
|
||||
* @dataProvider dataProviderInitiateQuery
|
||||
*
|
||||
* @param mixed $modifiers
|
||||
* @param mixed $acl
|
||||
* @param mixed $data
|
||||
*/
|
||||
public function testInitiateQuery(mixed $modifiers, mixed $acl, mixed $data)
|
||||
{
|
||||
@@ -377,10 +373,6 @@ abstract class AbstractExportTest extends WebTestCase
|
||||
* - nothing, if the query is a native SQL
|
||||
*
|
||||
* @dataProvider dataProviderInitiateQuery
|
||||
*
|
||||
* @param mixed $modifiers
|
||||
* @param mixed $acl
|
||||
* @param mixed $data
|
||||
*/
|
||||
public function testSupportsModifier(mixed $modifiers, mixed $acl, mixed $data)
|
||||
{
|
||||
|
@@ -22,7 +22,7 @@ use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
|
||||
*/
|
||||
final class UserControllerTest extends WebTestCase
|
||||
{
|
||||
private $client;
|
||||
private \Symfony\Bundle\FrameworkBundle\KernelBrowser $client;
|
||||
|
||||
private array $toDelete = [];
|
||||
|
||||
|
@@ -21,7 +21,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||
*/
|
||||
final class RouteLoaderTest extends KernelTestCase
|
||||
{
|
||||
private $router;
|
||||
private ?object $router = null;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@@ -22,7 +22,7 @@ final class AbstractSearchTest extends \PHPUnit\Framework\TestCase
|
||||
/**
|
||||
* @var \Chill\MainBundle\Search\AbstractSearch
|
||||
*/
|
||||
private $stub;
|
||||
private \Chill\MainBundle\Search\AbstractSearch&\PHPUnit\Framework\MockObject\MockObject $stub;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@@ -24,10 +24,7 @@ use PHPUnit\Framework\TestCase;
|
||||
*/
|
||||
final class SearchProviderTest extends TestCase
|
||||
{
|
||||
/**
|
||||
* @var SearchProvider
|
||||
*/
|
||||
private $search;
|
||||
private \Chill\MainBundle\Search\SearchProvider $search;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@@ -36,16 +36,14 @@ class TimelineBuilder implements ContainerAwareInterface
|
||||
*
|
||||
* @var TimelineProviderInterface[]
|
||||
*/
|
||||
private $providers = [];
|
||||
private array $providers = [];
|
||||
|
||||
/**
|
||||
* Record provider and their context.
|
||||
*
|
||||
* This array has the structure `[ 'context' => [ 'service id' ] ]`
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $providersByContext = [];
|
||||
private array $providersByContext = [];
|
||||
|
||||
public function __construct(private readonly EntityManagerInterface $em)
|
||||
{
|
||||
|
@@ -24,7 +24,7 @@ class CountriesInfo
|
||||
{
|
||||
private static $cacheCountriesCodeByContinent;
|
||||
|
||||
private static $preparedData;
|
||||
private static ?array $preparedData = null;
|
||||
|
||||
/**
|
||||
* get the information about country in arrays where :.
|
||||
|
@@ -29,11 +29,8 @@ use function count;
|
||||
*/
|
||||
class Version20150821105642 extends AbstractMigration implements \Symfony\Component\DependencyInjection\ContainerAwareInterface
|
||||
{
|
||||
/**
|
||||
* @var ContainerInterface
|
||||
*/
|
||||
private $container;
|
||||
public function __construct(\Doctrine\DBAL\Connection $connection, \Psr\Log\LoggerInterface $logger, private \Doctrine\ORM\EntityManager $entityManager)
|
||||
private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
|
||||
public function __construct(\Doctrine\DBAL\Connection $connection, \Psr\Log\LoggerInterface $logger, private readonly \Doctrine\ORM\EntityManager $entityManager)
|
||||
{
|
||||
parent::__construct($connection, $logger);
|
||||
}
|
||||
|
Reference in New Issue
Block a user