mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-06 21:39:42 +00:00
upgrade php-cs-fixer to 3.47.0
This commit is contained in:
@@ -175,7 +175,7 @@ class ApiController extends AbstractCRUDController
|
||||
public function indexApi(Request $request, string $_format)
|
||||
{
|
||||
return match ($request->getMethod()) {
|
||||
Request::METHOD_GET, REQUEST::METHOD_HEAD => $this->indexApiAction('_index', $request, $_format),
|
||||
Request::METHOD_GET, Request::METHOD_HEAD => $this->indexApiAction('_index', $request, $_format),
|
||||
default => throw $this->createNotFoundException('This method is not supported'),
|
||||
};
|
||||
}
|
||||
|
@@ -57,12 +57,12 @@ class ChillUserSendRenewPasswordCodeCommand extends Command
|
||||
/**
|
||||
* The current input interface.
|
||||
*/
|
||||
private ?\Symfony\Component\Console\Input\InputInterface $input = null;
|
||||
private ?InputInterface $input = null;
|
||||
|
||||
/**
|
||||
* The current output interface.
|
||||
*/
|
||||
private ?\Symfony\Component\Console\Output\OutputInterface $output = null;
|
||||
private ?OutputInterface $output = null;
|
||||
|
||||
public function __construct(
|
||||
LoggerInterface $logger,
|
||||
|
@@ -26,7 +26,7 @@ class LoadAddressReferences extends AbstractFixture implements ContainerAwareInt
|
||||
{
|
||||
protected $faker;
|
||||
|
||||
private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
|
||||
private ?ContainerInterface $container = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
@@ -23,7 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
*/
|
||||
class LoadCountries extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface
|
||||
{
|
||||
private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
|
||||
private ?ContainerInterface $container = null;
|
||||
|
||||
public function getOrder()
|
||||
{
|
||||
|
@@ -27,7 +27,7 @@ class LoadLanguages extends AbstractFixture implements ContainerAwareInterface,
|
||||
private array $ancientToExclude = ['ang', 'egy', 'fro', 'goh', 'grc', 'la', 'non', 'peo', 'pro', 'sga',
|
||||
'dum', 'enm', 'frm', 'gmh', 'mga', 'akk', 'phn', 'zxx', 'got', 'und', ];
|
||||
|
||||
private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
|
||||
private ?ContainerInterface $container = null;
|
||||
|
||||
// The regional version of language are language with _ in the code
|
||||
// This array contains regional code to not exclude
|
||||
|
@@ -23,7 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
*/
|
||||
class LoadLocationType extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface
|
||||
{
|
||||
private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
|
||||
private ?ContainerInterface $container = null;
|
||||
|
||||
public function getOrder()
|
||||
{
|
||||
|
@@ -53,7 +53,7 @@ class LoadUsers extends AbstractFixture implements ContainerAwareInterface, Orde
|
||||
],
|
||||
];
|
||||
|
||||
private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
|
||||
private ?ContainerInterface $container = null;
|
||||
|
||||
public function getOrder()
|
||||
{
|
||||
|
@@ -261,7 +261,7 @@ class ChillMainExtension extends Extension implements
|
||||
'ST_X' => STX::class,
|
||||
'ST_Y' => STY::class,
|
||||
'GREATEST' => Greatest::class,
|
||||
'LEAST' => LEAST::class,
|
||||
'LEAST' => Least::class,
|
||||
],
|
||||
'datetime_functions' => [
|
||||
'EXTRACT' => Extract::class,
|
||||
|
@@ -59,7 +59,7 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
|
||||
*
|
||||
* @groups({"read"})
|
||||
*/
|
||||
private ?\Chill\MainBundle\Doctrine\Model\Point $center = null;
|
||||
private ?Point $center = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=100)
|
||||
@@ -73,7 +73,7 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface
|
||||
*
|
||||
* @groups({"write", "read"})
|
||||
*/
|
||||
private ?\Chill\MainBundle\Entity\Country $country = null;
|
||||
private ?Country $country = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable", nullable=true, options={"default": null})
|
||||
|
@@ -84,7 +84,7 @@ class UserJobHistory
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setJob(?UserJob $job): UserJobHistory
|
||||
public function setJob(?UserJob $job): User\UserJobHistory
|
||||
{
|
||||
$this->job = $job;
|
||||
|
||||
@@ -98,7 +98,7 @@ class UserJobHistory
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setUser(User $user): UserJobHistory
|
||||
public function setUser(User $user): User\UserJobHistory
|
||||
{
|
||||
$this->user = $user;
|
||||
|
||||
|
@@ -84,7 +84,7 @@ class UserScopeHistory
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setScope(?Scope $scope): UserScopeHistory
|
||||
public function setScope(?Scope $scope): User\UserScopeHistory
|
||||
{
|
||||
$this->scope = $scope;
|
||||
|
||||
@@ -98,7 +98,7 @@ class UserScopeHistory
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setUser(User $user): UserScopeHistory
|
||||
public function setUser(User $user): User\UserScopeHistory
|
||||
{
|
||||
$this->user = $user;
|
||||
|
||||
|
@@ -26,7 +26,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
*/
|
||||
class ComposedRoleScopeType extends AbstractType
|
||||
{
|
||||
private readonly \Chill\MainBundle\Security\RoleProvider $roleProvider;
|
||||
private readonly RoleProvider $roleProvider;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
|
@@ -33,7 +33,7 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface
|
||||
|
||||
private bool $isConfigured = false;
|
||||
|
||||
private readonly PhonenumberUtil $phoneNumberUtil;
|
||||
private readonly PhoneNumberUtil $phoneNumberUtil;
|
||||
|
||||
private Client $twilioClient;
|
||||
|
||||
|
@@ -22,7 +22,7 @@ use Twig\TwigFunction;
|
||||
*/
|
||||
class MenuTwig extends AbstractExtension implements ContainerAwareInterface
|
||||
{
|
||||
private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null;
|
||||
private ?ContainerInterface $container = null;
|
||||
|
||||
/**
|
||||
* the default parameters for chillMenu.
|
||||
|
@@ -61,7 +61,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface
|
||||
*
|
||||
* @return User[]
|
||||
*/
|
||||
public function findUsersReaching(string $role, array|\Chill\MainBundle\Entity\Center $center, array|\Chill\MainBundle\Entity\Scope $scope = null, bool $onlyEnabled = true): array
|
||||
public function findUsersReaching(string $role, array|Center $center, array|Scope $scope = null, bool $onlyEnabled = true): array
|
||||
{
|
||||
return $this->userACLAwareRepository
|
||||
->findUsersByReachedACL($role, $center, $scope, $onlyEnabled);
|
||||
@@ -126,7 +126,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface
|
||||
*
|
||||
* @return Scope[]
|
||||
*/
|
||||
public function getReachableCircles(UserInterface $user, string $role, array|\Chill\MainBundle\Entity\Center $center)
|
||||
public function getReachableCircles(UserInterface $user, string $role, array|Center $center)
|
||||
{
|
||||
$scopes = [];
|
||||
|
||||
@@ -168,7 +168,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface
|
||||
*
|
||||
* @param Center|Center[] $center May be an array of center
|
||||
*/
|
||||
public function userCanReachCenter(User $user, array|\Chill\MainBundle\Entity\Center $center): bool
|
||||
public function userCanReachCenter(User $user, array|Center $center): bool
|
||||
{
|
||||
if ($center instanceof \Traversable) {
|
||||
foreach ($center as $c) {
|
||||
|
@@ -37,7 +37,7 @@ final readonly class ScopeResolverDispatcher
|
||||
/**
|
||||
* @return Scope|iterable<Scope>|Scope|null
|
||||
*/
|
||||
public function resolveScope(mixed $entity, ?array $options = []): null|\Chill\MainBundle\Entity\Scope|iterable
|
||||
public function resolveScope(mixed $entity, ?array $options = []): null|iterable|Scope
|
||||
{
|
||||
foreach ($this->resolvers as $resolver) {
|
||||
if ($resolver->supports($entity, $options)) {
|
||||
|
@@ -25,7 +25,7 @@ use PHPUnit\Framework\TestCase;
|
||||
*/
|
||||
final class SearchProviderTest extends TestCase
|
||||
{
|
||||
private \Chill\MainBundle\Search\SearchProvider $search;
|
||||
private SearchProvider $search;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
|
@@ -40,7 +40,7 @@ final class PhonenumberNormalizerTest extends TestCase
|
||||
/**
|
||||
* @dataProvider dataProviderNormalizePhonenumber
|
||||
*/
|
||||
public function testNormalize(?Phonenumber $phonenumber, mixed $format, mixed $context, mixed $expected)
|
||||
public function testNormalize(?PhoneNumber $phonenumber, mixed $format, mixed $context, mixed $expected)
|
||||
{
|
||||
$parameterBag = $this->prophesize(ParameterBagInterface::class);
|
||||
$parameterBag->get(Argument::exact('chill_main'))->willReturn(['phone_helper' => ['default_carrier_code' => 'BE']]);
|
||||
|
Reference in New Issue
Block a user