diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 3bf8957764..4533519ff6 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -21,5 +21,6 @@ 'yoda_style' => false, 'visibility_required' => ['elements' => ['property', 'method']], 'phpdoc_separation' => ['skip_unlisted_annotations' => true], + 'fully_qualified_strict_types' => false, ]) ->setFinder($finder); diff --git a/src/Kunstmaan/AdminBundle/AdminList/ExceptionAdminListConfigurator.php b/src/Kunstmaan/AdminBundle/AdminList/ExceptionAdminListConfigurator.php index 183d2290d9..0d5dbf73b5 100644 --- a/src/Kunstmaan/AdminBundle/AdminList/ExceptionAdminListConfigurator.php +++ b/src/Kunstmaan/AdminBundle/AdminList/ExceptionAdminListConfigurator.php @@ -13,7 +13,7 @@ class ExceptionAdminListConfigurator extends AbstractDoctrineORMAdminListConfigurator { - public function __construct(EntityManager $em, AclHelper $aclHelper = null) + public function __construct(EntityManager $em, ?AclHelper $aclHelper = null) { parent::__construct($em, $aclHelper); } diff --git a/src/Kunstmaan/AdminBundle/Entity/BaseUser.php b/src/Kunstmaan/AdminBundle/Entity/BaseUser.php index 84e4c8a2c1..6e757ce18f 100644 --- a/src/Kunstmaan/AdminBundle/Entity/BaseUser.php +++ b/src/Kunstmaan/AdminBundle/Entity/BaseUser.php @@ -562,7 +562,7 @@ public function getLastLogin() /** * @return static */ - public function setLastLogin(\DateTime $lastLogin = null) + public function setLastLogin(?\DateTime $lastLogin = null) { $this->lastLogin = $lastLogin; diff --git a/src/Kunstmaan/AdminBundle/Entity/UserInterface.php b/src/Kunstmaan/AdminBundle/Entity/UserInterface.php index 0b2bc67e76..a3917da7fa 100644 --- a/src/Kunstmaan/AdminBundle/Entity/UserInterface.php +++ b/src/Kunstmaan/AdminBundle/Entity/UserInterface.php @@ -115,7 +115,7 @@ public function setConfirmationToken($confirmationToken); * * @return static */ - public function setLastLogin(\DateTime $time = null); + public function setLastLogin(?\DateTime $time = null); /** * Never use this to check if this user has access to anything! diff --git a/src/Kunstmaan/AdminBundle/EventListener/AdminLocaleListener.php b/src/Kunstmaan/AdminBundle/EventListener/AdminLocaleListener.php index 2303c43dcc..c0a1b86049 100644 --- a/src/Kunstmaan/AdminBundle/EventListener/AdminLocaleListener.php +++ b/src/Kunstmaan/AdminBundle/EventListener/AdminLocaleListener.php @@ -72,7 +72,7 @@ public function onKernelRequest(RequestEvent $event) } } - private function isAdminToken($providerKey, TokenInterface $token = null): bool + private function isAdminToken($providerKey, ?TokenInterface $token = null): bool { if (null === $token) { return false; diff --git a/src/Kunstmaan/AdminBundle/Helper/AdminPanel/AdminPanelLogoutAction.php b/src/Kunstmaan/AdminBundle/Helper/AdminPanel/AdminPanelLogoutAction.php index 1e230c9ea9..4037cd034d 100644 --- a/src/Kunstmaan/AdminBundle/Helper/AdminPanel/AdminPanelLogoutAction.php +++ b/src/Kunstmaan/AdminBundle/Helper/AdminPanel/AdminPanelLogoutAction.php @@ -15,7 +15,7 @@ final class AdminPanelLogoutAction implements AdminPanelActionInterface /** @var string */ private $template = '@KunstmaanAdmin/AdminPanel/_admin_panel_logout_action.html.twig'; - public function __construct(string $url, string $label, string $icon = null, string $template = null) + public function __construct(string $url, string $label, ?string $icon = null, ?string $template = null) { $this->logoutUrl = $url; $this->label = $label; diff --git a/src/Kunstmaan/AdminBundle/Helper/AdminPanel/DefaultAdminPanelAdaptor.php b/src/Kunstmaan/AdminBundle/Helper/AdminPanel/DefaultAdminPanelAdaptor.php index 47aed5fed9..80c7b3b117 100644 --- a/src/Kunstmaan/AdminBundle/Helper/AdminPanel/DefaultAdminPanelAdaptor.php +++ b/src/Kunstmaan/AdminBundle/Helper/AdminPanel/DefaultAdminPanelAdaptor.php @@ -12,7 +12,7 @@ class DefaultAdminPanelAdaptor implements AdminPanelAdaptorInterface /** @var LogoutUrlGenerator */ private $logoutUrlGenerator; - public function __construct(TokenStorageInterface $tokenStorage, LogoutUrlGenerator $logoutUrlGenerator) + public function __construct(TokenStorageInterface $tokenStorage, ?LogoutUrlGenerator $logoutUrlGenerator) { $this->tokenStorage = $tokenStorage; $this->logoutUrlGenerator = $logoutUrlGenerator; diff --git a/src/Kunstmaan/AdminBundle/Helper/Menu/MenuAdaptorInterface.php b/src/Kunstmaan/AdminBundle/Helper/Menu/MenuAdaptorInterface.php index 62a77416ae..bc624ec41c 100644 --- a/src/Kunstmaan/AdminBundle/Helper/Menu/MenuAdaptorInterface.php +++ b/src/Kunstmaan/AdminBundle/Helper/Menu/MenuAdaptorInterface.php @@ -20,5 +20,5 @@ interface MenuAdaptorInterface * * @return void */ - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null); + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null); } diff --git a/src/Kunstmaan/AdminBundle/Helper/Menu/MenuBuilder.php b/src/Kunstmaan/AdminBundle/Helper/Menu/MenuBuilder.php index e7e2990759..9124331d77 100644 --- a/src/Kunstmaan/AdminBundle/Helper/Menu/MenuBuilder.php +++ b/src/Kunstmaan/AdminBundle/Helper/Menu/MenuBuilder.php @@ -136,7 +136,7 @@ public function getTopChildren() * * @return MenuItem[] */ - public function getChildren(MenuItem $parent = null) + public function getChildren(?MenuItem $parent = null) { if ($parent === null) { return $this->getTopChildren(); diff --git a/src/Kunstmaan/AdminBundle/Helper/Menu/MenuItem.php b/src/Kunstmaan/AdminBundle/Helper/Menu/MenuItem.php index 21a79db2ae..0db058d44d 100644 --- a/src/Kunstmaan/AdminBundle/Helper/Menu/MenuItem.php +++ b/src/Kunstmaan/AdminBundle/Helper/Menu/MenuItem.php @@ -180,7 +180,7 @@ public function getParent() * * @return MenuItem */ - public function setParent(MenuItem $parent = null) + public function setParent(?MenuItem $parent = null) { $this->parent = $parent; diff --git a/src/Kunstmaan/AdminBundle/Helper/Menu/ModulesMenuAdaptor.php b/src/Kunstmaan/AdminBundle/Helper/Menu/ModulesMenuAdaptor.php index d5a8c25c0e..a3a69ae314 100644 --- a/src/Kunstmaan/AdminBundle/Helper/Menu/ModulesMenuAdaptor.php +++ b/src/Kunstmaan/AdminBundle/Helper/Menu/ModulesMenuAdaptor.php @@ -9,7 +9,7 @@ */ class ModulesMenuAdaptor implements MenuAdaptorInterface { - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null) { if (\is_null($parent)) { $menuItem = new TopMenuItem($menu); diff --git a/src/Kunstmaan/AdminBundle/Helper/Menu/SettingsMenuAdaptor.php b/src/Kunstmaan/AdminBundle/Helper/Menu/SettingsMenuAdaptor.php index 36dd7fceb0..de8fd191ff 100644 --- a/src/Kunstmaan/AdminBundle/Helper/Menu/SettingsMenuAdaptor.php +++ b/src/Kunstmaan/AdminBundle/Helper/Menu/SettingsMenuAdaptor.php @@ -29,7 +29,7 @@ public function __construct(AuthorizationCheckerInterface $authorizationChecker, $this->exceptionLoggingEnabled = $exceptionLoggingEnabled; } - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null) { if (\is_null($parent)) { $menuItem = new TopMenuItem($menu); diff --git a/src/Kunstmaan/AdminBundle/Helper/Menu/SimpleMenuAdaptor.php b/src/Kunstmaan/AdminBundle/Helper/Menu/SimpleMenuAdaptor.php index 159ea0c6de..5cd1ea064a 100644 --- a/src/Kunstmaan/AdminBundle/Helper/Menu/SimpleMenuAdaptor.php +++ b/src/Kunstmaan/AdminBundle/Helper/Menu/SimpleMenuAdaptor.php @@ -23,7 +23,7 @@ public function __construct(AuthorizationCheckerInterface $authorizationChecker, $this->menuItems = $menuItems; } - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null) { foreach ($this->menuItems as $item) { if (false === $this->parentMatches($parent, $item)) { diff --git a/src/Kunstmaan/AdminBundle/Helper/Security/Acl/Voter/AclVoter.php b/src/Kunstmaan/AdminBundle/Helper/Security/Acl/Voter/AclVoter.php index 54c48ddf0e..60f22436c4 100644 --- a/src/Kunstmaan/AdminBundle/Helper/Security/Acl/Voter/AclVoter.php +++ b/src/Kunstmaan/AdminBundle/Helper/Security/Acl/Voter/AclVoter.php @@ -29,7 +29,7 @@ class AclVoter extends BaseAclVoter /** @var bool */ private $permissionsEnabled; - public function __construct(AclProviderInterface $aclProvider, ObjectIdentityRetrievalStrategyInterface $oidRetrievalStrategy, SecurityIdentityRetrievalStrategyInterface $sidRetrievalStrategy, PermissionMapInterface $permissionMap, LoggerInterface $logger = null, $allowIfObjectIdentityUnavailable = true, $permissionsEnabled = true) + public function __construct(AclProviderInterface $aclProvider, ObjectIdentityRetrievalStrategyInterface $oidRetrievalStrategy, SecurityIdentityRetrievalStrategyInterface $sidRetrievalStrategy, PermissionMapInterface $permissionMap, ?LoggerInterface $logger = null, $allowIfObjectIdentityUnavailable = true, $permissionsEnabled = true) { parent::__construct($aclProvider, $oidRetrievalStrategy, $sidRetrievalStrategy, $permissionMap, $logger, $allowIfObjectIdentityUnavailable); $this->permissionsEnabled = $permissionsEnabled; diff --git a/src/Kunstmaan/AdminBundle/Tests/DependencyInjection/KunstmaanAdminExtensionTest.php b/src/Kunstmaan/AdminBundle/Tests/DependencyInjection/KunstmaanAdminExtensionTest.php index d9d496e0dd..3da10d8991 100644 --- a/src/Kunstmaan/AdminBundle/Tests/DependencyInjection/KunstmaanAdminExtensionTest.php +++ b/src/Kunstmaan/AdminBundle/Tests/DependencyInjection/KunstmaanAdminExtensionTest.php @@ -91,7 +91,7 @@ public function testExceptionExcludesFromExceptionLoggingConfig() $this->assertContainerBuilderHasParameter('kunstmaan_admin.admin_exception_excludes', ['test_exclude_new_config']); } - private function getRequiredConfig(string $excludeKey = null) + private function getRequiredConfig(?string $excludeKey = null) { $requiredConfig = [ 'website_title' => 'Example title', diff --git a/src/Kunstmaan/AdminBundle/Tests/Helper/VersionCheck/VersionCheckTest.php b/src/Kunstmaan/AdminBundle/Tests/Helper/VersionCheck/VersionCheckTest.php index a005f014d9..e4da15611c 100644 --- a/src/Kunstmaan/AdminBundle/Tests/Helper/VersionCheck/VersionCheckTest.php +++ b/src/Kunstmaan/AdminBundle/Tests/Helper/VersionCheck/VersionCheckTest.php @@ -37,7 +37,7 @@ public function setUp(): void /** * @return \PHPUnit\Framework\MockObject\MockObject|VersionChecker */ - public function setUpVersionCheckerMock(?array $methods, string $projectDir = null) + public function setUpVersionCheckerMock(?array $methods, ?string $projectDir = null) { $versionCheckerMock = $this->getMockBuilder(VersionChecker::class) ->setConstructorArgs([$this->cache, $this->translator, $this->requestStack, 'url', 300, true, $projectDir ?? 'project_dir', 'website_title']) diff --git a/src/Kunstmaan/AdminBundle/Toolbar/BundleVersionDataCollector.php b/src/Kunstmaan/AdminBundle/Toolbar/BundleVersionDataCollector.php index 3eaef77be4..44ae1fbb16 100644 --- a/src/Kunstmaan/AdminBundle/Toolbar/BundleVersionDataCollector.php +++ b/src/Kunstmaan/AdminBundle/Toolbar/BundleVersionDataCollector.php @@ -51,7 +51,7 @@ public function collectData() /** * @return void */ - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { if (!$this->isEnabled()) { $this->data = []; diff --git a/src/Kunstmaan/AdminBundle/Toolbar/ExceptionDataCollector.php b/src/Kunstmaan/AdminBundle/Toolbar/ExceptionDataCollector.php index 7800658ee1..14d0ffa7fb 100644 --- a/src/Kunstmaan/AdminBundle/Toolbar/ExceptionDataCollector.php +++ b/src/Kunstmaan/AdminBundle/Toolbar/ExceptionDataCollector.php @@ -46,7 +46,7 @@ public function collectData() /** * @return void */ - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { if (false === $this->isEnabled()) { $this->data = false; diff --git a/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractAdminListConfigurator.php b/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractAdminListConfigurator.php index 3ff3ce4953..a9971d28ef 100644 --- a/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractAdminListConfigurator.php +++ b/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractAdminListConfigurator.php @@ -372,7 +372,7 @@ public function canExport() * * @return AbstractAdminListConfigurator */ - public function addField($name, $header, $sort, $template = null, FieldAlias $alias = null) + public function addField($name, $header, $sort, $template = null, ?FieldAlias $alias = null) { $this->fields[] = new Field($name, $header, $sort, $template, $alias); @@ -387,7 +387,7 @@ public function addField($name, $header, $sort, $template = null, FieldAlias $al * * @return AbstractAdminListConfigurator */ - public function addExportField($name, $header, $template = null, FieldAlias $alias = null) + public function addExportField($name, $header, $template = null, ?FieldAlias $alias = null) { $this->exportFields[] = new Field($name, $header, false, $template, $alias); @@ -404,7 +404,7 @@ public function addExportField($name, $header, $template = null, FieldAlias $ali */ public function addFilter( $columnName, - FilterTypeInterface $type = null, + ?FilterTypeInterface $type = null, $filterName = null, array $options = [] ) { diff --git a/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractDoctrineORMAdminListConfigurator.php b/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractDoctrineORMAdminListConfigurator.php index 5a1d7420f1..9eab1dbbe8 100644 --- a/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractDoctrineORMAdminListConfigurator.php +++ b/src/Kunstmaan/AdminListBundle/AdminList/Configurator/AbstractDoctrineORMAdminListConfigurator.php @@ -43,7 +43,7 @@ abstract class AbstractDoctrineORMAdminListConfigurator extends AbstractAdminLis */ protected $aclHelper; - public function __construct(EntityManagerInterface $em, AclHelper $aclHelper = null) + public function __construct(EntityManagerInterface $em, ?AclHelper $aclHelper = null) { $this->em = $em; $this->aclHelper = $aclHelper; diff --git a/src/Kunstmaan/AdminListBundle/AdminList/Field.php b/src/Kunstmaan/AdminListBundle/AdminList/Field.php index 646edd69c9..011ca96731 100644 --- a/src/Kunstmaan/AdminListBundle/AdminList/Field.php +++ b/src/Kunstmaan/AdminListBundle/AdminList/Field.php @@ -38,7 +38,7 @@ class Field * @param string $template The template * @param FieldAlias $alias The alias */ - public function __construct($name, $header, $sort = false, $template = null, FieldAlias $alias = null) + public function __construct($name, $header, $sort = false, $template = null, ?FieldAlias $alias = null) { $this->name = $name; $this->header = $header; diff --git a/src/Kunstmaan/AdminListBundle/AdminList/FilterBuilder.php b/src/Kunstmaan/AdminListBundle/AdminList/FilterBuilder.php index 9fcd43f594..e5538610f0 100644 --- a/src/Kunstmaan/AdminListBundle/AdminList/FilterBuilder.php +++ b/src/Kunstmaan/AdminListBundle/AdminList/FilterBuilder.php @@ -31,7 +31,7 @@ class FilterBuilder * * @return FilterBuilder */ - public function add($columnName, FilterTypeInterface $type = null, $filterName = null, array $options = []) + public function add($columnName, ?FilterTypeInterface $type = null, $filterName = null, array $options = []) { $this->filterDefinitions[$columnName] = [ 'type' => $type, diff --git a/src/Kunstmaan/AdminListBundle/Controller/AbstractAdminListController.php b/src/Kunstmaan/AdminListBundle/Controller/AbstractAdminListController.php index cc0e47c3dd..f7e55a7df3 100644 --- a/src/Kunstmaan/AdminListBundle/Controller/AbstractAdminListController.php +++ b/src/Kunstmaan/AdminListBundle/Controller/AbstractAdminListController.php @@ -74,7 +74,7 @@ protected function doIndexAction(AdminListConfiguratorInterface $configurator, R * * @throws AccessDeniedHttpException */ - protected function doExportAction(AdminListConfiguratorInterface $configurator, $_format, Request $request = null) + protected function doExportAction(AdminListConfiguratorInterface $configurator, $_format, ?Request $request = null) { if (!$configurator->canExport()) { throw $this->createAccessDeniedException('You do not have sufficient rights to access this page.'); diff --git a/src/Kunstmaan/AdminListBundle/Event/AdminListEvent.php b/src/Kunstmaan/AdminListBundle/Event/AdminListEvent.php index 8fc3a6e5ec..4d395d8da3 100644 --- a/src/Kunstmaan/AdminListBundle/Event/AdminListEvent.php +++ b/src/Kunstmaan/AdminListBundle/Event/AdminListEvent.php @@ -32,7 +32,7 @@ final class AdminListEvent extends Event /** * @param object $entity */ - public function __construct($entity, Request $request, FormInterface $form = null) + public function __construct($entity, Request $request, ?FormInterface $form = null) { $this->entity = $entity; $this->request = $request; diff --git a/src/Kunstmaan/AdminListBundle/Exception/ExportException.php b/src/Kunstmaan/AdminListBundle/Exception/ExportException.php index 520133b9b9..289005e5f7 100644 --- a/src/Kunstmaan/AdminListBundle/Exception/ExportException.php +++ b/src/Kunstmaan/AdminListBundle/Exception/ExportException.php @@ -10,7 +10,7 @@ class ExportException extends \RuntimeException * @param string $message * @param int $code */ - public function __construct($message, $data, $code = 0, \Throwable $previous = null) + public function __construct($message, $data, $code = 0, ?\Throwable $previous = null) { parent::__construct($message, $code, $previous); $this->data = $data; diff --git a/src/Kunstmaan/AdminListBundle/Repository/EntityVersionLockRepository.php b/src/Kunstmaan/AdminListBundle/Repository/EntityVersionLockRepository.php index be0f3a898b..76a82f1e83 100644 --- a/src/Kunstmaan/AdminListBundle/Repository/EntityVersionLockRepository.php +++ b/src/Kunstmaan/AdminListBundle/Repository/EntityVersionLockRepository.php @@ -18,7 +18,7 @@ class EntityVersionLockRepository extends EntityRepository * * @return LockableEntity[] */ - public function getLocksForLockableEntity(LockableEntity $entity, $threshold, UserInterface $userToExclude = null) + public function getLocksForLockableEntity(LockableEntity $entity, $threshold, ?UserInterface $userToExclude = null) { $qb = $this->createQueryBuilder('evl') ->select('evl') diff --git a/src/Kunstmaan/AdminListBundle/Service/EntityVersionLockService.php b/src/Kunstmaan/AdminListBundle/Service/EntityVersionLockService.php index 9a7da5c9fb..4670d4c24b 100644 --- a/src/Kunstmaan/AdminListBundle/Service/EntityVersionLockService.php +++ b/src/Kunstmaan/AdminListBundle/Service/EntityVersionLockService.php @@ -96,7 +96,7 @@ protected function createEntityVersionLock(UserInterface $user, LockableEntity $ /** * @return array */ - public function getUsersWithEntityVersionLock(LockableEntityInterface $entity, UserInterface $userToExclude = null) + public function getUsersWithEntityVersionLock(LockableEntityInterface $entity, ?UserInterface $userToExclude = null) { /** @var LockableEntity $lockable */ $lockable = $this->getLockableEntity($entity); @@ -125,7 +125,7 @@ protected function removeExpiredLocks(LockableEntity $entity) * * @return EntityVersionLock[] */ - protected function getEntityVersionLocksByLockableEntity(LockableEntity $entity, UserInterface $userToExclude = null) + protected function getEntityVersionLocksByLockableEntity(LockableEntity $entity, ?UserInterface $userToExclude = null) { /** @var EntityVersionLockRepository $objectRepository */ $objectRepository = $this->objectManager->getRepository(EntityVersionLock::class); diff --git a/src/Kunstmaan/AdminListBundle/Tests/AdminList/Configurator/AbstractDoctrineDBALAdminListConfiguratorTest.php b/src/Kunstmaan/AdminListBundle/Tests/AdminList/Configurator/AbstractDoctrineDBALAdminListConfiguratorTest.php index 33fc135e18..102e4fde40 100644 --- a/src/Kunstmaan/AdminListBundle/Tests/AdminList/Configurator/AbstractDoctrineDBALAdminListConfiguratorTest.php +++ b/src/Kunstmaan/AdminListBundle/Tests/AdminList/Configurator/AbstractDoctrineDBALAdminListConfiguratorTest.php @@ -4,6 +4,7 @@ use Doctrine\DBAL\Connection; use Doctrine\DBAL\ForwardCompatibility\DriverStatement; +use Doctrine\DBAL\Platforms\MySQLPlatform; use Doctrine\DBAL\Query\QueryBuilder; use Doctrine\DBAL\Result; use Doctrine\DBAL\Statement; @@ -24,6 +25,7 @@ class AbstractDoctrineDBALAdminListConfiguratorTest extends TestCase public function setUp(): void { $this->connectionMock = $this->createMock(Connection::class); + $this->connectionMock->method('getDatabasePlatform')->willReturn(new MySQLPlatform()); $this->connectionMock ->expects($this->any()) ->method('executeQuery') diff --git a/src/Kunstmaan/AdminListBundle/Tests/AdminList/FilterType/DBAL/BaseDbalFilterTest.php b/src/Kunstmaan/AdminListBundle/Tests/AdminList/FilterType/DBAL/BaseDbalFilterTest.php index e7cb9fcf24..4b6bc10f2a 100644 --- a/src/Kunstmaan/AdminListBundle/Tests/AdminList/FilterType/DBAL/BaseDbalFilterTest.php +++ b/src/Kunstmaan/AdminListBundle/Tests/AdminList/FilterType/DBAL/BaseDbalFilterTest.php @@ -3,6 +3,7 @@ namespace Kunstmaan\AdminListBundle\Tests\AdminList\FilterType\DBAL; use Doctrine\DBAL\Connection; +use Doctrine\DBAL\Platforms\MySQLPlatform; use Doctrine\DBAL\Query\Expression\ExpressionBuilder; use Doctrine\DBAL\Query\QueryBuilder; use PHPUnit\Framework\TestCase; @@ -14,6 +15,10 @@ public function getQueryBuilder() $conn = $this->createMock(Connection::class); $expressionBuilder = new ExpressionBuilder($conn); + $conn->method('getDatabasePlatform')->willReturn(new MySQLPlatform()); + if (method_exists(Connection::class, 'createExpressionBuilder')) { + $conn->method('createExpressionBuilder')->willReturn($expressionBuilder); + } $conn->method('getExpressionBuilder')->willReturn($expressionBuilder); return new QueryBuilder($conn); diff --git a/src/Kunstmaan/CacheBundle/Helper/Menu/VarnishMenuAdaptor.php b/src/Kunstmaan/CacheBundle/Helper/Menu/VarnishMenuAdaptor.php index ff8d96bd28..769b85d439 100644 --- a/src/Kunstmaan/CacheBundle/Helper/Menu/VarnishMenuAdaptor.php +++ b/src/Kunstmaan/CacheBundle/Helper/Menu/VarnishMenuAdaptor.php @@ -9,7 +9,7 @@ class VarnishMenuAdaptor implements MenuAdaptorInterface { - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null) { if (!is_null($parent) && 'KunstmaanAdminBundle_settings' == $parent->getRoute()) { $menuItem = new MenuItem($menu); diff --git a/src/Kunstmaan/ConfigBundle/Helper/Menu/ConfigMenuAdaptor.php b/src/Kunstmaan/ConfigBundle/Helper/Menu/ConfigMenuAdaptor.php index cf7d718484..df27b85907 100644 --- a/src/Kunstmaan/ConfigBundle/Helper/Menu/ConfigMenuAdaptor.php +++ b/src/Kunstmaan/ConfigBundle/Helper/Menu/ConfigMenuAdaptor.php @@ -29,7 +29,7 @@ public function __construct($configuration, AuthorizationCheckerInterface $autho $this->authorizationChecker = $authorizationChecker; } - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null) { if (!\is_null($parent) && 'KunstmaanAdminBundle_settings' == $parent->getRoute()) { // Load all the kunstmaan_config entities and create a menu item for them. diff --git a/src/Kunstmaan/CookieBundle/AdminList/CookieAdminListConfigurator.php b/src/Kunstmaan/CookieBundle/AdminList/CookieAdminListConfigurator.php index 5ab2f6c31b..345ab4f5be 100644 --- a/src/Kunstmaan/CookieBundle/AdminList/CookieAdminListConfigurator.php +++ b/src/Kunstmaan/CookieBundle/AdminList/CookieAdminListConfigurator.php @@ -24,7 +24,7 @@ class CookieAdminListConfigurator extends AbstractDoctrineORMAdminListConfigurat */ private $domainConfiguration; - public function __construct(EntityManager $em, AclHelper $aclHelper = null, DomainConfigurationInterface $domainConfiguration = null) + public function __construct(EntityManager $em, ?AclHelper $aclHelper = null, ?DomainConfigurationInterface $domainConfiguration = null) { parent::__construct($em, $aclHelper); diff --git a/src/Kunstmaan/CookieBundle/AdminList/CookieTypeAdminListConfigurator.php b/src/Kunstmaan/CookieBundle/AdminList/CookieTypeAdminListConfigurator.php index ddf10e5398..1375ebe806 100644 --- a/src/Kunstmaan/CookieBundle/AdminList/CookieTypeAdminListConfigurator.php +++ b/src/Kunstmaan/CookieBundle/AdminList/CookieTypeAdminListConfigurator.php @@ -18,7 +18,7 @@ class CookieTypeAdminListConfigurator extends AbstractDoctrineORMAdminListConfig * @param EntityManager $em The entity manager * @param AclHelper $aclHelper The acl helper */ - public function __construct(EntityManager $em, AclHelper $aclHelper = null) + public function __construct(EntityManager $em, ?AclHelper $aclHelper = null) { parent::__construct($em, $aclHelper); $this->setAdminType(CookieTypeAdminType::class); diff --git a/src/Kunstmaan/CookieBundle/Entity/Cookie.php b/src/Kunstmaan/CookieBundle/Entity/Cookie.php index bb0dbbf741..4782c9fb16 100644 --- a/src/Kunstmaan/CookieBundle/Entity/Cookie.php +++ b/src/Kunstmaan/CookieBundle/Entity/Cookie.php @@ -98,7 +98,7 @@ public function getDescription() /** * @return Cookie */ - public function setType(CookieType $type = null) + public function setType(?CookieType $type = null) { $this->type = $type; diff --git a/src/Kunstmaan/CookieBundle/Helper/Menu/CookieMenuAdaptor.php b/src/Kunstmaan/CookieBundle/Helper/Menu/CookieMenuAdaptor.php index 2c4d8265d8..cdd273c889 100644 --- a/src/Kunstmaan/CookieBundle/Helper/Menu/CookieMenuAdaptor.php +++ b/src/Kunstmaan/CookieBundle/Helper/Menu/CookieMenuAdaptor.php @@ -22,7 +22,7 @@ class CookieMenuAdaptor implements MenuAdaptorInterface * @param MenuItem $parent The parent Menu item * @param Request $request The Request */ - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null) { if (null !== $parent && 'KunstmaanAdminBundle_modules' === $parent->getRoute()) { $this->addMenuItem( @@ -63,7 +63,7 @@ public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $par * @param string $uniqueId * @param string $label */ - private function addMenuItem(MenuBuilder $menu, array &$children, MenuItem $parent, Request $request = null, $route, $uniqueId, $label) + private function addMenuItem(MenuBuilder $menu, array &$children, MenuItem $parent, ?Request $request = null, $route, $uniqueId, $label) { $menuItem = new TopMenuItem($menu); $menuItem diff --git a/src/Kunstmaan/FixturesBundle/Loader/FixtureLoader.php b/src/Kunstmaan/FixturesBundle/Loader/FixtureLoader.php index 2cd3a376ec..444f130e2a 100644 --- a/src/Kunstmaan/FixturesBundle/Loader/FixtureLoader.php +++ b/src/Kunstmaan/FixturesBundle/Loader/FixtureLoader.php @@ -93,7 +93,7 @@ public function getProviders() * * @api */ - public function setContainer(ContainerInterface $container = null) + public function setContainer(?ContainerInterface $container = null) { $this->container = $container; } diff --git a/src/Kunstmaan/FormBundle/Helper/FormHandler.php b/src/Kunstmaan/FormBundle/Helper/FormHandler.php index b39935b04f..c6d3d10aaa 100644 --- a/src/Kunstmaan/FormBundle/Helper/FormHandler.php +++ b/src/Kunstmaan/FormBundle/Helper/FormHandler.php @@ -32,10 +32,10 @@ class FormHandler implements FormHandlerInterface public function __construct( ContainerInterface $container, - EntityManagerInterface $em, - FormFactoryInterface $formFactory, - RouterInterface $router, - EventDispatcherInterface $eventDispatcher + ?EntityManagerInterface $em, + ?FormFactoryInterface $formFactory, + ?RouterInterface $router, + ?EventDispatcherInterface $eventDispatcher ) { $this->container = $container; $this->em = $em; diff --git a/src/Kunstmaan/FormBundle/Helper/Menu/FormSubmissionsMenuAdaptor.php b/src/Kunstmaan/FormBundle/Helper/Menu/FormSubmissionsMenuAdaptor.php index ac06a0f0ec..d08c6ae62d 100644 --- a/src/Kunstmaan/FormBundle/Helper/Menu/FormSubmissionsMenuAdaptor.php +++ b/src/Kunstmaan/FormBundle/Helper/Menu/FormSubmissionsMenuAdaptor.php @@ -10,7 +10,7 @@ class FormSubmissionsMenuAdaptor implements MenuAdaptorInterface { - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null) { if (!is_null($parent) && 'KunstmaanAdminBundle_modules' == $parent->getRoute()) { $menuitem = new TopMenuItem($menu); diff --git a/src/Kunstmaan/GeneratorBundle/Command/KunstmaanGenerateCommand.php b/src/Kunstmaan/GeneratorBundle/Command/KunstmaanGenerateCommand.php index 4e7e288b56..100d56cf2c 100644 --- a/src/Kunstmaan/GeneratorBundle/Command/KunstmaanGenerateCommand.php +++ b/src/Kunstmaan/GeneratorBundle/Command/KunstmaanGenerateCommand.php @@ -133,7 +133,7 @@ protected function isBundleAvailable($bundleName) * * @return string The prefix. But it's also been set on the InputInterface. */ - protected function askForPrefix(array $text = null, $namespace = null) + protected function askForPrefix(?array $text = null, $namespace = null) { $prefix = $this->assistant->getOptionOrDefault('prefix', null); diff --git a/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/UserFixtures.php b/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/UserFixtures.php index 695221500e..469c2f25cf 100644 --- a/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/UserFixtures.php +++ b/src/Kunstmaan/GeneratorBundle/DataFixtures/ORM/UserFixtures.php @@ -29,7 +29,7 @@ class UserFixtures extends AbstractFixture implements OrderedFixtureInterface, C * * @api */ - public function setContainer(ContainerInterface $container = null) + public function setContainer(?ContainerInterface $container = null) { $this->container = $container; } diff --git a/src/Kunstmaan/GeneratorBundle/Generator/ConfigGenerator.php b/src/Kunstmaan/GeneratorBundle/Generator/ConfigGenerator.php index 0839effad9..1dc2d2ba8c 100644 --- a/src/Kunstmaan/GeneratorBundle/Generator/ConfigGenerator.php +++ b/src/Kunstmaan/GeneratorBundle/Generator/ConfigGenerator.php @@ -13,7 +13,7 @@ */ class ConfigGenerator extends KunstmaanGenerator { - public function __construct(Filesystem $filesystem, ManagerRegistry $registry, $skeletonDir, CommandAssistant $assistant, ContainerInterface $container = null) + public function __construct(Filesystem $filesystem, ManagerRegistry $registry, $skeletonDir, CommandAssistant $assistant, ?ContainerInterface $container = null) { parent::__construct($filesystem, $registry, $skeletonDir, $assistant, $container); } diff --git a/src/Kunstmaan/GeneratorBundle/Generator/KunstmaanGenerator.php b/src/Kunstmaan/GeneratorBundle/Generator/KunstmaanGenerator.php index 061eedef64..3d985a058a 100644 --- a/src/Kunstmaan/GeneratorBundle/Generator/KunstmaanGenerator.php +++ b/src/Kunstmaan/GeneratorBundle/Generator/KunstmaanGenerator.php @@ -61,7 +61,7 @@ public function __construct( ManagerRegistry $registry, $skeletonDir, CommandAssistant $assistant, - ContainerInterface $container = null + ?ContainerInterface $container = null ) { $this->filesystem = $filesystem; $this->registry = $registry; diff --git a/src/Kunstmaan/GeneratorBundle/Helper/CommandAssistant.php b/src/Kunstmaan/GeneratorBundle/Helper/CommandAssistant.php index b0218e148a..2be83101a4 100644 --- a/src/Kunstmaan/GeneratorBundle/Helper/CommandAssistant.php +++ b/src/Kunstmaan/GeneratorBundle/Helper/CommandAssistant.php @@ -114,7 +114,7 @@ public function askAndValidate( $question, $validator, $defaultValue = null, - array $autoComplete = null + ?array $autoComplete = null ) { $validationQuestion = new Question( $this->getQuestionHelper()->getQuestion($question, $defaultValue), @@ -151,7 +151,7 @@ public function askConfirmation( ); } - public function ask($question, $default = null, array $autoComplete = null) + public function ask($question, $default = null, ?array $autoComplete = null) { $askQuestion = new Question( $this->questionHelper->getQuestion($question, $default), $default diff --git a/src/Kunstmaan/GeneratorBundle/Helper/InputAssistant.php b/src/Kunstmaan/GeneratorBundle/Helper/InputAssistant.php index d006846850..d9d4468556 100644 --- a/src/Kunstmaan/GeneratorBundle/Helper/InputAssistant.php +++ b/src/Kunstmaan/GeneratorBundle/Helper/InputAssistant.php @@ -46,7 +46,7 @@ public function __construct(InputInterface &$input, OutputInterface $output, Que * * @return string The namespace. But it's also been set on the InputInterface. */ - public function askForNamespace(array $text = null) + public function askForNamespace(?array $text = null) { $namespace = $this->input->hasOption('namespace') ? $this->input->getOption('namespace') : null; @@ -168,7 +168,7 @@ private function fixNamespace($namespace) * * @return string The prefix. But it's also been set on the InputInterface. */ - public function askForPrefix(array $text = null, $namespace = null) + public function askForPrefix(?array $text = null, $namespace = null) { $prefix = $this->input->hasOption('prefix') ? $this->input->getOption('prefix') : null; diff --git a/src/Kunstmaan/GeneratorBundle/Helper/Sf4AppBundle.php b/src/Kunstmaan/GeneratorBundle/Helper/Sf4AppBundle.php index 283c6bc980..ea5bf0467b 100644 --- a/src/Kunstmaan/GeneratorBundle/Helper/Sf4AppBundle.php +++ b/src/Kunstmaan/GeneratorBundle/Helper/Sf4AppBundle.php @@ -57,7 +57,7 @@ public function getPath(): string return $this->projectDir . '/src'; } - public function setContainer(ContainerInterface $container = null): void + public function setContainer(?ContainerInterface $container = null): void { // no-op } diff --git a/src/Kunstmaan/LeadGenerationBundle/AdminList/PopupAdminListConfigurator.php b/src/Kunstmaan/LeadGenerationBundle/AdminList/PopupAdminListConfigurator.php index 0832fe4da0..ddd7663a3b 100644 --- a/src/Kunstmaan/LeadGenerationBundle/AdminList/PopupAdminListConfigurator.php +++ b/src/Kunstmaan/LeadGenerationBundle/AdminList/PopupAdminListConfigurator.php @@ -13,7 +13,7 @@ class PopupAdminListConfigurator extends AbstractDoctrineORMAdminListConfigurato * @param EntityManager $em The entity manager * @param AclHelper $aclHelper The acl helper */ - public function __construct(EntityManager $em, AclHelper $aclHelper = null) + public function __construct(EntityManager $em, ?AclHelper $aclHelper = null) { parent::__construct($em, $aclHelper); diff --git a/src/Kunstmaan/LeadGenerationBundle/Controller/AbstractNewsletterController.php b/src/Kunstmaan/LeadGenerationBundle/Controller/AbstractNewsletterController.php index dac0171ea3..545b23a3c3 100644 --- a/src/Kunstmaan/LeadGenerationBundle/Controller/AbstractNewsletterController.php +++ b/src/Kunstmaan/LeadGenerationBundle/Controller/AbstractNewsletterController.php @@ -17,7 +17,7 @@ abstract class AbstractNewsletterController extends AbstractController /** @var EntityManagerInterface */ private $em; - public function __construct(EntityManagerInterface $em) + public function __construct(?EntityManagerInterface $em) { $this->em = $em; } diff --git a/src/Kunstmaan/LeadGenerationBundle/Controller/AbstractRedirectController.php b/src/Kunstmaan/LeadGenerationBundle/Controller/AbstractRedirectController.php index 7e736ece53..97b4f507aa 100644 --- a/src/Kunstmaan/LeadGenerationBundle/Controller/AbstractRedirectController.php +++ b/src/Kunstmaan/LeadGenerationBundle/Controller/AbstractRedirectController.php @@ -12,7 +12,7 @@ abstract class AbstractRedirectController extends AbstractController /** @var EntityManagerInterface */ private $em; - public function __construct(EntityManagerInterface $em) + public function __construct(?EntityManagerInterface $em) { $this->em = $em; } diff --git a/src/Kunstmaan/LeadGenerationBundle/Service/MenuAdaptor.php b/src/Kunstmaan/LeadGenerationBundle/Service/MenuAdaptor.php index fcaa1b0bad..9ea21c8e04 100644 --- a/src/Kunstmaan/LeadGenerationBundle/Service/MenuAdaptor.php +++ b/src/Kunstmaan/LeadGenerationBundle/Service/MenuAdaptor.php @@ -10,7 +10,7 @@ class MenuAdaptor implements MenuAdaptorInterface { - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null) { if (!\is_null($parent) && 'KunstmaanAdminBundle_modules' == $parent->getRoute()) { $menuItem = new TopMenuItem($menu); diff --git a/src/Kunstmaan/MediaBundle/Entity/Folder.php b/src/Kunstmaan/MediaBundle/Entity/Folder.php index fa38e037b6..e041ec9c1d 100644 --- a/src/Kunstmaan/MediaBundle/Entity/Folder.php +++ b/src/Kunstmaan/MediaBundle/Entity/Folder.php @@ -289,7 +289,7 @@ public function getParent() /** * @return Folder */ - public function setParent(Folder $parent = null) + public function setParent(?Folder $parent = null) { $this->parent = $parent; diff --git a/src/Kunstmaan/MediaBundle/Helper/Menu/MediaMenuAdaptor.php b/src/Kunstmaan/MediaBundle/Helper/Menu/MediaMenuAdaptor.php index 45c9300294..894a3ec1b9 100644 --- a/src/Kunstmaan/MediaBundle/Helper/Menu/MediaMenuAdaptor.php +++ b/src/Kunstmaan/MediaBundle/Helper/Menu/MediaMenuAdaptor.php @@ -28,7 +28,7 @@ public function __construct($repo) $this->repo = $repo; } - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null) { if (\is_null($parent)) { // Add menu item for root gallery diff --git a/src/Kunstmaan/MediaBundle/Repository/FolderRepository.php b/src/Kunstmaan/MediaBundle/Repository/FolderRepository.php index 2ff549c065..4273fbddd3 100644 --- a/src/Kunstmaan/MediaBundle/Repository/FolderRepository.php +++ b/src/Kunstmaan/MediaBundle/Repository/FolderRepository.php @@ -306,7 +306,7 @@ public function rebuildTree() * * @return QueryBuilder */ - public function selectFolderQueryBuilder(Folder $ignoreSubtree = null) + public function selectFolderQueryBuilder(?Folder $ignoreSubtree = null) { /** @var QueryBuilder $qb */ $qb = $this->createQueryBuilder('f'); diff --git a/src/Kunstmaan/MediaBundle/Twig/MediaTwigExtension.php b/src/Kunstmaan/MediaBundle/Twig/MediaTwigExtension.php index 86783cddff..7c268b9ace 100644 --- a/src/Kunstmaan/MediaBundle/Twig/MediaTwigExtension.php +++ b/src/Kunstmaan/MediaBundle/Twig/MediaTwigExtension.php @@ -28,7 +28,7 @@ public function getFunctions(): array ]; } - public function getCroppedImage(EditableMediaWrapper $editableMediaWrapper, string $view = '', string $filter = null) + public function getCroppedImage(EditableMediaWrapper $editableMediaWrapper, string $view = '', ?string $filter = null) { if ($filter) { return $this->manipulateImageService->cropImage($editableMediaWrapper, $view, $filter); diff --git a/src/Kunstmaan/MediaBundle/Validator/Constraints/Media.php b/src/Kunstmaan/MediaBundle/Validator/Constraints/Media.php index 3bc1709d66..02bed4f93e 100644 --- a/src/Kunstmaan/MediaBundle/Validator/Constraints/Media.php +++ b/src/Kunstmaan/MediaBundle/Validator/Constraints/Media.php @@ -75,18 +75,18 @@ class Media extends Constraint */ public function __construct( array $options = [], - array $groups = null, + ?array $groups = null, $payload = null, - int $minHeight = null, - int $maxHeight = null, - int $minWidth = null, - int $maxWidth = null, - array $mimeTypes = null, - string $minHeightMessage = null, - string $maxHeightMessage = null, - string $minWidthMessage = null, - string $maxWidthMessage = null, - string $mimeTypesMessage = null + ?int $minHeight = null, + ?int $maxHeight = null, + ?int $minWidth = null, + ?int $maxWidth = null, + ?array $mimeTypes = null, + ?string $minHeightMessage = null, + ?string $maxHeightMessage = null, + ?string $minWidthMessage = null, + ?string $maxWidthMessage = null, + ?string $mimeTypesMessage = null ) { parent::__construct($options, $groups, $payload); diff --git a/src/Kunstmaan/MenuBundle/AdminList/MenuAdminListConfigurator.php b/src/Kunstmaan/MenuBundle/AdminList/MenuAdminListConfigurator.php index d63647f8b2..c575981fa5 100644 --- a/src/Kunstmaan/MenuBundle/AdminList/MenuAdminListConfigurator.php +++ b/src/Kunstmaan/MenuBundle/AdminList/MenuAdminListConfigurator.php @@ -19,7 +19,7 @@ class MenuAdminListConfigurator extends AbstractDoctrineORMAdminListConfigurator * @param EntityManager $em The entity manager * @param AclHelper $aclHelper The acl helper */ - public function __construct(EntityManager $em, AclHelper $aclHelper = null) + public function __construct(EntityManager $em, ?AclHelper $aclHelper = null) { parent::__construct($em, $aclHelper); } diff --git a/src/Kunstmaan/MenuBundle/Service/MenuAdaptor.php b/src/Kunstmaan/MenuBundle/Service/MenuAdaptor.php index 2b33f99ae3..02b5a9c0a9 100644 --- a/src/Kunstmaan/MenuBundle/Service/MenuAdaptor.php +++ b/src/Kunstmaan/MenuBundle/Service/MenuAdaptor.php @@ -20,7 +20,7 @@ public function __construct(array $menuNames) $this->menuNames = $menuNames; } - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null) { if ((count($this->menuNames) > 0) && null !== $parent && 'KunstmaanAdminBundle_modules' === $parent->getRoute()) { $menuItem = new TopMenuItem($menu); diff --git a/src/Kunstmaan/NodeBundle/Entity/NodeVersionLock.php b/src/Kunstmaan/NodeBundle/Entity/NodeVersionLock.php index 179dc389d1..7201cbfaf6 100644 --- a/src/Kunstmaan/NodeBundle/Entity/NodeVersionLock.php +++ b/src/Kunstmaan/NodeBundle/Entity/NodeVersionLock.php @@ -117,7 +117,7 @@ public function getOwner() * * @return NodeVersionLock */ - public function setNodeTranslation(NodeTranslation $nodeTranslation = null) + public function setNodeTranslation(?NodeTranslation $nodeTranslation = null) { $this->nodeTranslation = $nodeTranslation; diff --git a/src/Kunstmaan/NodeBundle/Event/AdaptFormEvent.php b/src/Kunstmaan/NodeBundle/Event/AdaptFormEvent.php index 5072ed5b69..82c070a100 100644 --- a/src/Kunstmaan/NodeBundle/Event/AdaptFormEvent.php +++ b/src/Kunstmaan/NodeBundle/Event/AdaptFormEvent.php @@ -49,7 +49,7 @@ final class AdaptFormEvent extends Event * @param NodeTranslation $nodeTranslation The node translation * @param NodeVersion $nodeVersion The node version */ - public function __construct(Request $request, TabPane $tabPane, $page = null, Node $node = null, NodeTranslation $nodeTranslation = null, NodeVersion $nodeVersion = null) + public function __construct(Request $request, TabPane $tabPane, $page = null, ?Node $node = null, ?NodeTranslation $nodeTranslation = null, ?NodeVersion $nodeVersion = null) { $this->request = $request; $this->tabPane = $tabPane; diff --git a/src/Kunstmaan/NodeBundle/Exception/NoNodeTranslationException.php b/src/Kunstmaan/NodeBundle/Exception/NoNodeTranslationException.php index ed6a6fa14b..fbdbf672b3 100644 --- a/src/Kunstmaan/NodeBundle/Exception/NoNodeTranslationException.php +++ b/src/Kunstmaan/NodeBundle/Exception/NoNodeTranslationException.php @@ -8,7 +8,7 @@ class NoNodeTranslationException extends \Exception * @param string $message * @param int $code */ - public function __construct($message = 'No Node Translation found', $code = 0, \Throwable $previous = null) + public function __construct($message = 'No Node Translation found', $code = 0, ?\Throwable $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/src/Kunstmaan/NodeBundle/Helper/Menu/PageMenuAdaptor.php b/src/Kunstmaan/NodeBundle/Helper/Menu/PageMenuAdaptor.php index fc062d4e39..daad4ce867 100644 --- a/src/Kunstmaan/NodeBundle/Helper/Menu/PageMenuAdaptor.php +++ b/src/Kunstmaan/NodeBundle/Helper/Menu/PageMenuAdaptor.php @@ -69,8 +69,8 @@ public function __construct( public function adaptChildren( MenuBuilder $menu, array &$children, - MenuItem $parent = null, - Request $request = null + ?MenuItem $parent = null, + ?Request $request = null ) { if (null === $parent) { $menuItem = new TopMenuItem($menu); diff --git a/src/Kunstmaan/NodeBundle/Helper/NodeAdmin/NodeVersionLockHelper.php b/src/Kunstmaan/NodeBundle/Helper/NodeAdmin/NodeVersionLockHelper.php index f8fc16ac26..51d9758d3c 100644 --- a/src/Kunstmaan/NodeBundle/Helper/NodeAdmin/NodeVersionLockHelper.php +++ b/src/Kunstmaan/NodeBundle/Helper/NodeAdmin/NodeVersionLockHelper.php @@ -57,7 +57,7 @@ public function isNodeVersionLocked(BaseUser $user, NodeTranslation $nodeTransla * * @return array */ - public function getUsersWithNodeVersionLock(NodeTranslation $nodeTranslation, $isPublicNodeVersion, BaseUser $userToExclude = null) + public function getUsersWithNodeVersionLock(NodeTranslation $nodeTranslation, $isPublicNodeVersion, ?BaseUser $userToExclude = null) { return array_reduce( $this->getNodeVersionLocksByNodeTranslation($nodeTranslation, $isPublicNodeVersion, $userToExclude), @@ -110,7 +110,7 @@ protected function createNodeVersionLock(BaseUser $user, NodeTranslation $nodeTr * * @return NodeVersionLock[] */ - protected function getNodeVersionLocksByNodeTranslation(NodeTranslation $nodeTranslation, $isPublicVersion, BaseUser $userToExclude = null) + protected function getNodeVersionLocksByNodeTranslation(NodeTranslation $nodeTranslation, $isPublicVersion, ?BaseUser $userToExclude = null) { $threshold = $this->container->getParameter('kunstmaan_node.lock_threshold'); /** @var NodeVersionLockRepository $objectRepository */ diff --git a/src/Kunstmaan/NodeBundle/Helper/NodeHelper.php b/src/Kunstmaan/NodeBundle/Helper/NodeHelper.php index 14892e4681..0384289dd0 100644 --- a/src/Kunstmaan/NodeBundle/Helper/NodeHelper.php +++ b/src/Kunstmaan/NodeBundle/Helper/NodeHelper.php @@ -139,7 +139,7 @@ public function updatePage( NodeVersion $nodeVersion, HasNodeInterface $page, $isStructureNode, - TabPane $tabPane = null + ?TabPane $tabPane = null ) { $this->eventDispatcher->dispatch( new NodeEvent($node, $nodeTranslation, $nodeVersion, $page), @@ -182,7 +182,7 @@ public function createPage( $refEntityType, $pageTitle, $locale, - Node $parentNode = null) + ?Node $parentNode = null) { $user = $this->getAdminUser(); diff --git a/src/Kunstmaan/NodeBundle/Helper/NodeMenu.php b/src/Kunstmaan/NodeBundle/Helper/NodeMenu.php index 7b4335769b..c68a1c3b8c 100644 --- a/src/Kunstmaan/NodeBundle/Helper/NodeMenu.php +++ b/src/Kunstmaan/NodeBundle/Helper/NodeMenu.php @@ -121,7 +121,7 @@ public function setLocale($locale) $this->locale = $locale; } - public function setCurrentNode(Node $currentNode = null) + public function setCurrentNode(?Node $currentNode = null) { $this->currentNode = $currentNode; } diff --git a/src/Kunstmaan/NodeBundle/Helper/PageCloningHelper.php b/src/Kunstmaan/NodeBundle/Helper/PageCloningHelper.php index f6bcb68793..f85e37ab75 100644 --- a/src/Kunstmaan/NodeBundle/Helper/PageCloningHelper.php +++ b/src/Kunstmaan/NodeBundle/Helper/PageCloningHelper.php @@ -54,7 +54,7 @@ public function __construct(EntityManagerInterface $em, CloneHelper $cloneHelper /** * @throws AccessDeniedException */ - public function duplicateWithChildren($id, string $locale, BaseUser $user, string $title = null): Node + public function duplicateWithChildren($id, string $locale, BaseUser $user, ?string $title = null): Node { /* @var Node $parentNode */ $originalNode = $this->em->getRepository(Node::class)->find($id); diff --git a/src/Kunstmaan/NodeBundle/Repository/NodeRepository.php b/src/Kunstmaan/NodeBundle/Repository/NodeRepository.php index af98a7e300..d15d510443 100644 --- a/src/Kunstmaan/NodeBundle/Repository/NodeRepository.php +++ b/src/Kunstmaan/NodeBundle/Repository/NodeRepository.php @@ -264,7 +264,7 @@ public function getAllMenuNodes( $permission, AclNativeHelper $aclNativeHelper, $includeHiddenFromNav = false, - Node $rootNode = null + ?Node $rootNode = null ) { $connection = $this->_em->getConnection(); $qb = $connection->createQueryBuilder(); @@ -352,7 +352,7 @@ public function getAllMenuNodes( * * @return Node[] */ - public function getAllParents(Node $node = null, $lang = null) + public function getAllParents(?Node $node = null, $lang = null) { if (\is_null($node)) { return []; @@ -396,7 +396,7 @@ public function getAllParents(Node $node = null, $lang = null) * * @return Node */ - public function getRootNodeFor(Node $node = null, $lang = null) + public function getRootNodeFor(?Node $node = null, $lang = null) { if (\is_null($node)) { return null; diff --git a/src/Kunstmaan/NodeBundle/Repository/NodeTranslationRepository.php b/src/Kunstmaan/NodeBundle/Repository/NodeTranslationRepository.php index ea51c25a83..213ef657d6 100644 --- a/src/Kunstmaan/NodeBundle/Repository/NodeTranslationRepository.php +++ b/src/Kunstmaan/NodeBundle/Repository/NodeTranslationRepository.php @@ -47,7 +47,7 @@ public function getNodeTranslationByNodeId(int $nodeId, string $lang) * * @return int */ - public function getMaxChildrenWeight(Node $parentNode = null, $lang = null) + public function getMaxChildrenWeight(?Node $parentNode = null, $lang = null) { $maxWeight = $this->getNodeTranslationsQueryBuilder($lang) ->select('max(nt.weight)') @@ -68,7 +68,7 @@ public function getMaxChildrenWeight(Node $parentNode = null, $lang = null) * * @return int */ - public function getMinChildrenWeight(Node $parentNode = null, $lang = null) + public function getMinChildrenWeight(?Node $parentNode = null, $lang = null) { $minWeight = $this->getNodeTranslationsQueryBuilder($lang) ->select('min(nt.weight)') @@ -220,7 +220,7 @@ public function getNodeTranslationFor(HasNodeInterface $hasNode) */ public function getNodeTranslationForSlug( $slug, - NodeTranslation $parentNode = null + ?NodeTranslation $parentNode = null ) { if (empty($slug)) { return $this->getNodeTranslationForSlugPart(null, $slug); @@ -244,7 +244,7 @@ public function getNodeTranslationForSlug( * @return NodeTranslation|null */ private function getNodeTranslationForSlugPart( - NodeTranslation $parentNode = null, + ?NodeTranslation $parentNode = null, $slugPart = '' ) { $qb = $this->createQueryBuilder('t') @@ -297,8 +297,8 @@ public function getAllNodeTranslationsForUrl( $urlSlug, $locale = '', $includeDeleted = false, - NodeTranslation $toExclude = null, - Node $rootNode = null + ?NodeTranslation $toExclude = null, + ?Node $rootNode = null ) { $qb = $this->createQueryBuilder('b') ->select('b', 'v') @@ -362,8 +362,8 @@ public function getNodeTranslationForUrl( $urlSlug, $locale = '', $includeDeleted = false, - NodeTranslation $toExclude = null, - Node $rootNode = null + ?NodeTranslation $toExclude = null, + ?Node $rootNode = null ) { $translations = $this->getAllNodeTranslationsForUrl($urlSlug, $locale, $includeDeleted, $toExclude, $rootNode); diff --git a/src/Kunstmaan/NodeBundle/Repository/NodeVersionLockRepository.php b/src/Kunstmaan/NodeBundle/Repository/NodeVersionLockRepository.php index 408027804c..f6d1112163 100644 --- a/src/Kunstmaan/NodeBundle/Repository/NodeVersionLockRepository.php +++ b/src/Kunstmaan/NodeBundle/Repository/NodeVersionLockRepository.php @@ -16,7 +16,7 @@ class NodeVersionLockRepository extends \Doctrine\ORM\EntityRepository * * @return NodeVersionLock[] */ - public function getLocksForNodeTranslation(NodeTranslation $nodeTranslation, $isPublicVersion, $threshold, BaseUser $userToExclude = null) + public function getLocksForNodeTranslation(NodeTranslation $nodeTranslation, $isPublicVersion, $threshold, ?BaseUser $userToExclude = null) { $qb = $this->createQueryBuilder('nvl') ->select('nvl') diff --git a/src/Kunstmaan/NodeBundle/Repository/NodeVersionRepository.php b/src/Kunstmaan/NodeBundle/Repository/NodeVersionRepository.php index 330db5f376..7b74c3e2db 100644 --- a/src/Kunstmaan/NodeBundle/Repository/NodeVersionRepository.php +++ b/src/Kunstmaan/NodeBundle/Repository/NodeVersionRepository.php @@ -41,7 +41,7 @@ public function createNodeVersionFor( HasNodeInterface $hasNode, NodeTranslation $nodeTranslation, BaseUser $owner, - NodeVersion $origin = null, + ?NodeVersion $origin = null, $type = 'public', $created = null ) { diff --git a/src/Kunstmaan/NodeBundle/Toolbar/NodeDataCollector.php b/src/Kunstmaan/NodeBundle/Toolbar/NodeDataCollector.php index a8144cc985..76fdfa8a8a 100644 --- a/src/Kunstmaan/NodeBundle/Toolbar/NodeDataCollector.php +++ b/src/Kunstmaan/NodeBundle/Toolbar/NodeDataCollector.php @@ -60,7 +60,7 @@ public function collectData() /** * @return void */ - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { if (!$this->showDataCollection($request, $response) || !$this->isEnabled()) { $this->data = false; diff --git a/src/Kunstmaan/NodeBundle/Twig/NodeTwigExtension.php b/src/Kunstmaan/NodeBundle/Twig/NodeTwigExtension.php index 6ba49edf2d..bd100b66ef 100644 --- a/src/Kunstmaan/NodeBundle/Twig/NodeTwigExtension.php +++ b/src/Kunstmaan/NodeBundle/Twig/NodeTwigExtension.php @@ -211,7 +211,7 @@ public function getUrlByInternalName($internalName, $locale, $parameters = [], $ * * @return NodeMenu */ - public function getNodeMenu($locale, Node $node = null, $includeHiddenFromNav = false) + public function getNodeMenu($locale, ?Node $node = null, $includeHiddenFromNav = false) { $request = $this->requestStack->getMainRequest(); $isPreview = $request->attributes->has('preview') && $request->attributes->get('preview') === true; diff --git a/src/Kunstmaan/NodeSearchBundle/EventListener/NodeIndexUpdateEventListener.php b/src/Kunstmaan/NodeSearchBundle/EventListener/NodeIndexUpdateEventListener.php index 4d6204a29a..6c851116fc 100644 --- a/src/Kunstmaan/NodeSearchBundle/EventListener/NodeIndexUpdateEventListener.php +++ b/src/Kunstmaan/NodeSearchBundle/EventListener/NodeIndexUpdateEventListener.php @@ -28,7 +28,7 @@ class NodeIndexUpdateEventListener implements NodeIndexUpdateEventListenerInterf /** @var array */ private $entityChangeSet; - public function __construct(NodePagesConfiguration $nodePagesConfiguration, EntityManagerInterface $em = null) + public function __construct(NodePagesConfiguration $nodePagesConfiguration, ?EntityManagerInterface $em = null) { $this->nodePagesConfiguration = $nodePagesConfiguration; $this->em = $em; diff --git a/src/Kunstmaan/NodeSearchBundle/PagerFanta/Adapter/SearcherRequestAdapter.php b/src/Kunstmaan/NodeSearchBundle/PagerFanta/Adapter/SearcherRequestAdapter.php index fc8064e5f5..3c98748598 100644 --- a/src/Kunstmaan/NodeSearchBundle/PagerFanta/Adapter/SearcherRequestAdapter.php +++ b/src/Kunstmaan/NodeSearchBundle/PagerFanta/Adapter/SearcherRequestAdapter.php @@ -79,7 +79,7 @@ public function getSlice($offset, $length): iterable /** * @return array|ResultSet */ - protected function processResponse(ResultSet $result = null) + protected function processResponse(?ResultSet $result = null) { $this->hits = []; if (\is_null($result)) { diff --git a/src/Kunstmaan/NodeSearchBundle/Services/SearchViewRenderer.php b/src/Kunstmaan/NodeSearchBundle/Services/SearchViewRenderer.php index 60caf9ab5b..fbb88fa5e8 100644 --- a/src/Kunstmaan/NodeSearchBundle/Services/SearchViewRenderer.php +++ b/src/Kunstmaan/NodeSearchBundle/Services/SearchViewRenderer.php @@ -48,7 +48,7 @@ public function renderDefaultSearchView(NodeTranslation $nodeTranslation, HasPag return $this->removeHtml($html); } - public function renderCustomSearchView(NodeTranslation $nodeTranslation, SearchViewTemplateInterface $page, ContainerInterface $container = null) + public function renderCustomSearchView(NodeTranslation $nodeTranslation, SearchViewTemplateInterface $page, ?ContainerInterface $container = null) { $renderContext = new RenderContext([ 'locale' => $nodeTranslation->getLang(), diff --git a/src/Kunstmaan/PagePartBundle/Entity/AbstractPagePart.php b/src/Kunstmaan/PagePartBundle/Entity/AbstractPagePart.php index 7e33b99ac4..d6201ea7f4 100644 --- a/src/Kunstmaan/PagePartBundle/Entity/AbstractPagePart.php +++ b/src/Kunstmaan/PagePartBundle/Entity/AbstractPagePart.php @@ -28,7 +28,7 @@ public function getAdminView() * * @return string */ - public function getView(HasPagePartsInterface $page = null) + public function getView(?HasPagePartsInterface $page = null) { return $this->getDefaultView(); } diff --git a/src/Kunstmaan/PagePartBundle/Helper/PagePartInterface.php b/src/Kunstmaan/PagePartBundle/Helper/PagePartInterface.php index 8b64b7f4bf..b91647e2cd 100644 --- a/src/Kunstmaan/PagePartBundle/Helper/PagePartInterface.php +++ b/src/Kunstmaan/PagePartBundle/Helper/PagePartInterface.php @@ -28,7 +28,7 @@ public function getAdminView(); * * @return string */ - public function getView(HasPagePartsInterface $page = null); + public function getView(?HasPagePartsInterface $page = null); /** * Returns the default backend form type for the page part. diff --git a/src/Kunstmaan/PagePartBundle/Helper/Services/PagePartCreatorService.php b/src/Kunstmaan/PagePartBundle/Helper/Services/PagePartCreatorService.php index e5bb6945e4..e1cafa3b55 100644 --- a/src/Kunstmaan/PagePartBundle/Helper/Services/PagePartCreatorService.php +++ b/src/Kunstmaan/PagePartBundle/Helper/Services/PagePartCreatorService.php @@ -197,7 +197,7 @@ public function setPageTemplate($nodeOrInternalName, $language, $templateName) * * @return callable the function that will instantiate a pagepart */ - public function getCreatorArgumentsForPagePartAndProperties($pagePartClassName, array $setters = null) + public function getCreatorArgumentsForPagePartAndProperties($pagePartClassName, ?array $setters = null) { return function () use ($pagePartClassName, $setters) { $pp = new $pagePartClassName(); diff --git a/src/Kunstmaan/PagePartBundle/PagePartAdmin/PagePartAdmin.php b/src/Kunstmaan/PagePartBundle/PagePartAdmin/PagePartAdmin.php index d0da2a598e..ae1e5234dd 100644 --- a/src/Kunstmaan/PagePartBundle/PagePartAdmin/PagePartAdmin.php +++ b/src/Kunstmaan/PagePartBundle/PagePartAdmin/PagePartAdmin.php @@ -69,7 +69,7 @@ class PagePartAdmin * * @throws \InvalidArgumentException */ - public function __construct(PagePartAdminConfiguratorInterface $configurator, EntityManagerInterface $em, HasPagePartsInterface $page, $context = null, ContainerInterface $container = null) + public function __construct(PagePartAdminConfiguratorInterface $configurator, EntityManagerInterface $em, HasPagePartsInterface $page, $context = null, ?ContainerInterface $container = null) { if (!($page instanceof EntityInterface)) { throw new \InvalidArgumentException('Page must be an instance of EntityInterface.'); diff --git a/src/Kunstmaan/RedirectBundle/Helper/Menu/RedirectMenuAdaptor.php b/src/Kunstmaan/RedirectBundle/Helper/Menu/RedirectMenuAdaptor.php index ed9480f0ac..01b9083181 100644 --- a/src/Kunstmaan/RedirectBundle/Helper/Menu/RedirectMenuAdaptor.php +++ b/src/Kunstmaan/RedirectBundle/Helper/Menu/RedirectMenuAdaptor.php @@ -9,7 +9,7 @@ class RedirectMenuAdaptor implements MenuAdaptorInterface { - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null) { if (!\is_null($parent) && 'KunstmaanAdminBundle_settings' == $parent->getRoute()) { $menuItem = new MenuItem($menu); diff --git a/src/Kunstmaan/RedirectBundle/Tests/Router/RedirectRouterTest.php b/src/Kunstmaan/RedirectBundle/Tests/Router/RedirectRouterTest.php index b367ce54a5..065fbb1ff4 100644 --- a/src/Kunstmaan/RedirectBundle/Tests/Router/RedirectRouterTest.php +++ b/src/Kunstmaan/RedirectBundle/Tests/Router/RedirectRouterTest.php @@ -70,7 +70,7 @@ public function urlProviderForImprovedRouter(): iterable yield 'Unknown redirect' => ['/unkown-redirect', null, null]; } - private function getRedirect(int $id, string $origin, string $target, bool $permanent = false, string $domain = null): Redirect + private function getRedirect(int $id, string $origin, string $target, bool $permanent = false, ?string $domain = null): Redirect { $redirect = new Redirect(); $redirect diff --git a/src/Kunstmaan/SeoBundle/Entity/Seo.php b/src/Kunstmaan/SeoBundle/Entity/Seo.php index 91f73ec93f..7c3cabaa21 100644 --- a/src/Kunstmaan/SeoBundle/Entity/Seo.php +++ b/src/Kunstmaan/SeoBundle/Entity/Seo.php @@ -319,7 +319,7 @@ public function getOgDescription() /** * @return Seo */ - public function setOgImage(Media $ogImage = null) + public function setOgImage(?Media $ogImage = null) { $this->ogImage = $ogImage; diff --git a/src/Kunstmaan/SeoBundle/Helper/Menu/SeoManagementMenuAdaptor.php b/src/Kunstmaan/SeoBundle/Helper/Menu/SeoManagementMenuAdaptor.php index ff11c9c276..f932d59fa1 100644 --- a/src/Kunstmaan/SeoBundle/Helper/Menu/SeoManagementMenuAdaptor.php +++ b/src/Kunstmaan/SeoBundle/Helper/Menu/SeoManagementMenuAdaptor.php @@ -20,7 +20,7 @@ public function __construct(AuthorizationCheckerInterface $authorizationChecker) $this->authorizationChecker = $authorizationChecker; } - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null) { if (!\is_null($parent) && ('KunstmaanAdminBundle_settings' == $parent->getRoute()) && $this->authorizationChecker->isGranted('ROLE_SUPER_ADMIN')) { $menuItem = new MenuItem($menu); diff --git a/src/Kunstmaan/SeoBundle/Twig/SeoTwigExtension.php b/src/Kunstmaan/SeoBundle/Twig/SeoTwigExtension.php index 2899de6ec1..b96c4f33b3 100644 --- a/src/Kunstmaan/SeoBundle/Twig/SeoTwigExtension.php +++ b/src/Kunstmaan/SeoBundle/Twig/SeoTwigExtension.php @@ -128,7 +128,7 @@ public function getTitleFor(AbstractPage $entity) * * @return string */ - public function getTitleForPageOrDefault(AbstractPage $entity = null, $default = null) + public function getTitleForPageOrDefault(?AbstractPage $entity = null, $default = null) { if (\is_null($entity)) { return $default; @@ -183,7 +183,7 @@ protected function getPreferredValue(array $values) /** * @return string|null */ - private function getSeoTitle(AbstractPage $entity = null) + private function getSeoTitle(?AbstractPage $entity = null) { if (\is_null($entity)) { return null; diff --git a/src/Kunstmaan/SitemapBundle/Model/SitemapIndex.php b/src/Kunstmaan/SitemapBundle/Model/SitemapIndex.php index 8b9d9f1325..bfeb11cb1f 100644 --- a/src/Kunstmaan/SitemapBundle/Model/SitemapIndex.php +++ b/src/Kunstmaan/SitemapBundle/Model/SitemapIndex.php @@ -14,7 +14,7 @@ final class SitemapIndex */ private $lastModified; - public function __construct(string $url, \DateTimeInterface $lastModified = null) + public function __construct(string $url, ?\DateTimeInterface $lastModified = null) { $this->url = $url; $this->lastModified = $lastModified; diff --git a/src/Kunstmaan/TaggingBundle/AdminList/TagAdminListConfigurator.php b/src/Kunstmaan/TaggingBundle/AdminList/TagAdminListConfigurator.php index 7fc629add9..a05c9446c6 100644 --- a/src/Kunstmaan/TaggingBundle/AdminList/TagAdminListConfigurator.php +++ b/src/Kunstmaan/TaggingBundle/AdminList/TagAdminListConfigurator.php @@ -14,7 +14,7 @@ class TagAdminListConfigurator extends AbstractDoctrineORMAdminListConfigurator * @param EntityManager $em The entity manager * @param AclHelper $aclHelper The acl helper */ - public function __construct(EntityManager $em, AclHelper $aclHelper = null) + public function __construct(EntityManager $em, ?AclHelper $aclHelper = null) { parent::__construct($em, $aclHelper); $this->setAdminType(TagAdminType::class); diff --git a/src/Kunstmaan/TaggingBundle/Helper/Menu/TagMenuAdaptor.php b/src/Kunstmaan/TaggingBundle/Helper/Menu/TagMenuAdaptor.php index 935ac91517..da0cda0b2a 100644 --- a/src/Kunstmaan/TaggingBundle/Helper/Menu/TagMenuAdaptor.php +++ b/src/Kunstmaan/TaggingBundle/Helper/Menu/TagMenuAdaptor.php @@ -10,7 +10,7 @@ class TagMenuAdaptor implements MenuAdaptorInterface { - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null) { if (!\is_null($parent) && 'KunstmaanAdminBundle_modules' == $parent->getRoute()) { $menuItem = new TopMenuItem($menu); diff --git a/src/Kunstmaan/TranslatorBundle/AdminList/TranslationAdminListConfigurator.php b/src/Kunstmaan/TranslatorBundle/AdminList/TranslationAdminListConfigurator.php index ba5e04bc8a..a9091b960e 100644 --- a/src/Kunstmaan/TranslatorBundle/AdminList/TranslationAdminListConfigurator.php +++ b/src/Kunstmaan/TranslatorBundle/AdminList/TranslationAdminListConfigurator.php @@ -86,7 +86,7 @@ public function getExportFields() return $this->exportFields; } - public function addExportField($name, $header, $template = null, FieldAlias $alias = null) + public function addExportField($name, $header, $template = null, ?FieldAlias $alias = null) { $this->exportFields[] = new Field($name, $header); diff --git a/src/Kunstmaan/TranslatorBundle/Service/Menu/TranslatorMenuAdaptor.php b/src/Kunstmaan/TranslatorBundle/Service/Menu/TranslatorMenuAdaptor.php index 7bd3f4e6a8..04a53fb2f2 100644 --- a/src/Kunstmaan/TranslatorBundle/Service/Menu/TranslatorMenuAdaptor.php +++ b/src/Kunstmaan/TranslatorBundle/Service/Menu/TranslatorMenuAdaptor.php @@ -9,7 +9,7 @@ class TranslatorMenuAdaptor implements MenuAdaptorInterface { - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null) { if (\is_null($parent)) { return; diff --git a/src/Kunstmaan/TranslatorBundle/Toolbar/TranslatorDataCollector.php b/src/Kunstmaan/TranslatorBundle/Toolbar/TranslatorDataCollector.php index 53d1c7d826..0465b1227f 100644 --- a/src/Kunstmaan/TranslatorBundle/Toolbar/TranslatorDataCollector.php +++ b/src/Kunstmaan/TranslatorBundle/Toolbar/TranslatorDataCollector.php @@ -75,7 +75,7 @@ public function collectData() /** * @return void */ - public function collect(Request $request, Response $response, \Throwable $exception = null) + public function collect(Request $request, Response $response, ?\Throwable $exception = null) { if (!$this->showDataCollection($request, $response) || !$this->isEnabled()) { $this->data = false; diff --git a/src/Kunstmaan/UserManagementBundle/Helper/Menu/UserManagementMenuAdaptor.php b/src/Kunstmaan/UserManagementBundle/Helper/Menu/UserManagementMenuAdaptor.php index 68d04eb827..771b5c0b01 100644 --- a/src/Kunstmaan/UserManagementBundle/Helper/Menu/UserManagementMenuAdaptor.php +++ b/src/Kunstmaan/UserManagementBundle/Helper/Menu/UserManagementMenuAdaptor.php @@ -20,7 +20,7 @@ public function __construct(AuthorizationCheckerInterface $authorizationChecker) $this->authorizationChecker = $authorizationChecker; } - public function adaptChildren(MenuBuilder $menu, array &$children, MenuItem $parent = null, Request $request = null) + public function adaptChildren(MenuBuilder $menu, array &$children, ?MenuItem $parent = null, ?Request $request = null) { if (\is_null($parent)) { return;