upgrade php-cs-fixer to 3.47.0

This commit is contained in:
2024-01-22 12:14:39 +01:00
parent fdfc3fb7ec
commit 27ce322690
58 changed files with 114 additions and 113 deletions

View File

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

View File

@@ -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,

View File

@@ -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()
{

View File

@@ -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()
{

View File

@@ -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

View File

@@ -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()
{

View File

@@ -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()
{

View File

@@ -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,

View File

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

View File

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

View File

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

View File

@@ -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[]

View File

@@ -33,7 +33,7 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface
private bool $isConfigured = false;
private readonly PhonenumberUtil $phoneNumberUtil;
private readonly PhoneNumberUtil $phoneNumberUtil;
private Client $twilioClient;

View File

@@ -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.

View File

@@ -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) {

View File

@@ -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)) {

View File

@@ -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
{

View File

@@ -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']]);