This commit is contained in:
Jeremy Benoist 2024-02-19 09:31:30 +01:00 committed by Jérémy Benoist
parent d4dca8f6c9
commit ed6ca862f5
11 changed files with 12 additions and 12 deletions

View file

@ -20,7 +20,7 @@ abstract class AbstractConsumer
protected $eventDispatcher;
protected $logger;
public function __construct(EntityManagerInterface $em, UserRepository $userRepository, AbstractImport $import, EventDispatcherInterface $eventDispatcher, LoggerInterface $logger = null)
public function __construct(EntityManagerInterface $em, UserRepository $userRepository, AbstractImport $import, EventDispatcherInterface $eventDispatcher, ?LoggerInterface $logger = null)
{
$this->em = $em;
$this->userRepository = $userRepository;

View file

@ -15,7 +15,7 @@ class IgnoreOriginInstanceRuleFixtures extends Fixture implements ContainerAware
*/
private $container;
public function setContainer(ContainerInterface $container = null)
public function setContainer(?ContainerInterface $container = null)
{
$this->container = $container;
}

View file

@ -15,7 +15,7 @@ class InternalSettingFixtures extends Fixture implements ContainerAwareInterface
*/
private $container;
public function setContainer(ContainerInterface $container = null)
public function setContainer(?ContainerInterface $container = null)
{
$this->container = $container;
}

View file

@ -18,7 +18,7 @@ class SiteCredentialFixtures extends Fixture implements DependentFixtureInterfac
*/
private $container;
public function setContainer(ContainerInterface $container = null)
public function setContainer(?ContainerInterface $container = null)
{
$this->container = $container;
}

View file

@ -26,7 +26,7 @@ abstract class WallabagMigration extends AbstractMigration implements ContainerA
{
}
public function setContainer(ContainerInterface $container = null)
public function setContainer(?ContainerInterface $container = null)
{
$this->container = $container;
}

View file

@ -262,7 +262,7 @@ class Config
*
* @return Config
*/
public function setUser(User $user = null)
public function setUser(?User $user = null)
{
$this->user = $user;

View file

@ -252,7 +252,7 @@ class User extends BaseUser implements EmailTwoFactorInterface, GoogleTwoFactorI
*
* @return User
*/
public function setConfig(Config $config = null)
public function setConfig(?Config $config = null)
{
$this->config = $config;
@ -333,7 +333,7 @@ class User extends BaseUser implements EmailTwoFactorInterface, GoogleTwoFactorI
$this->googleAuthenticatorSecret = $googleAuthenticatorSecret;
}
public function setBackupCodes(array $codes = null)
public function setBackupCodes(?array $codes = null)
{
$this->backupCodes = $codes;
}

View file

@ -22,7 +22,7 @@ class PreparePagerForEntries
*
* @return Pagerfanta
*/
public function prepare(AdapterInterface $adapter, User $user = null)
public function prepare(AdapterInterface $adapter, ?User $user = null)
{
if (null === $user) {
$user = $this->tokenStorage->getToken() ? $this->tokenStorage->getToken()->getUser() : null;

View file

@ -141,7 +141,7 @@ class PocketImport extends AbstractImport
/**
* Set the Http client.
*/
public function setClient(ClientInterface $client, RequestFactoryInterface $requestFactory = null, StreamFactoryInterface $streamFactory = null)
public function setClient(ClientInterface $client, ?RequestFactoryInterface $requestFactory = null, ?StreamFactoryInterface $streamFactory = null)
{
$this->client = new HttpMethodsClient(new PluginClient($client, [new ErrorPlugin()]), $requestFactory ?: Psr17FactoryDiscovery::findRequestFactory(), $streamFactory ?: Psr17FactoryDiscovery::findStreamFactory());
}

View file

@ -23,7 +23,7 @@ class UsernameFeedTokenConverter implements ParamConverterInterface
/**
* @param ManagerRegistry $registry Manager registry
*/
public function __construct(ManagerRegistry $registry = null)
public function __construct(?ManagerRegistry $registry = null)
{
$this->registry = $registry;
}

View file

@ -16,7 +16,7 @@ class ClientRepository extends ServiceEntityRepository
parent::__construct($registry, Client::class);
}
public function findOneBy(array $criteria, array $orderBy = null)
public function findOneBy(array $criteria, ?array $orderBy = null)
{
if (!empty($criteria['id'])) {
// cast client id to be an integer to avoid postgres error: