diff --git a/src/Kunstmaan/ArticleBundle/AdminList/AbstractArticleCategoryAdminListConfigurator.php b/src/Kunstmaan/ArticleBundle/AdminList/AbstractArticleCategoryAdminListConfigurator.php index d7bc057f83..733b36d274 100644 --- a/src/Kunstmaan/ArticleBundle/AdminList/AbstractArticleCategoryAdminListConfigurator.php +++ b/src/Kunstmaan/ArticleBundle/AdminList/AbstractArticleCategoryAdminListConfigurator.php @@ -75,7 +75,7 @@ public function getQuery() { $query = parent::getQuery(); - if (!is_null($query)) { + if (!\is_null($query)) { $query->setHint( \Doctrine\ORM\Query::HINT_CUSTOM_OUTPUT_WALKER, 'Gedmo\\Translatable\\Query\\TreeWalker\\TranslationWalker' diff --git a/src/Kunstmaan/ArticleBundle/AdminList/AbstractArticlePageAdminListConfigurator.php b/src/Kunstmaan/ArticleBundle/AdminList/AbstractArticlePageAdminListConfigurator.php index 1453d38dec..0b32643798 100644 --- a/src/Kunstmaan/ArticleBundle/AdminList/AbstractArticlePageAdminListConfigurator.php +++ b/src/Kunstmaan/ArticleBundle/AdminList/AbstractArticlePageAdminListConfigurator.php @@ -157,7 +157,7 @@ public function getOverviewPage() $repository = $this->getOverviewPageRepository(); $pages = $repository->findActiveOverviewPages(); - if (isset($pages) && count($pages) > 0) { + if (isset($pages) && \count($pages) > 0) { return $pages[0]; } diff --git a/src/Kunstmaan/ArticleBundle/AdminList/AbstractArticleTagAdminListConfigurator.php b/src/Kunstmaan/ArticleBundle/AdminList/AbstractArticleTagAdminListConfigurator.php index 56cf2984c4..7de81e8672 100644 --- a/src/Kunstmaan/ArticleBundle/AdminList/AbstractArticleTagAdminListConfigurator.php +++ b/src/Kunstmaan/ArticleBundle/AdminList/AbstractArticleTagAdminListConfigurator.php @@ -75,7 +75,7 @@ public function getQuery() { $query = parent::getQuery(); - if (!is_null($query)) { + if (!\is_null($query)) { $query->setHint( \Doctrine\ORM\Query::HINT_CUSTOM_OUTPUT_WALKER, 'Gedmo\\Translatable\\Query\\TreeWalker\\TranslationWalker' diff --git a/src/Kunstmaan/ArticleBundle/Entity/AbstractAuthor.php b/src/Kunstmaan/ArticleBundle/Entity/AbstractAuthor.php index 19ea35ecaa..86e835deb2 100644 --- a/src/Kunstmaan/ArticleBundle/Entity/AbstractAuthor.php +++ b/src/Kunstmaan/ArticleBundle/Entity/AbstractAuthor.php @@ -15,7 +15,7 @@ class AbstractAuthor extends AbstractEntity */ public function __construct() { - if (get_class($this) === AbstractAuthor::class) { + if (\get_class($this) === AbstractAuthor::class) { @trigger_error(sprintf('Instantiating the "%s" class is deprecated in KunstmaanArticleBundle 5.1 and will be made abstract in KunstmaanArticleBundle 6.0. Extend your implementation from this class instead.', __CLASS__), E_USER_DEPRECATED); } } diff --git a/src/Kunstmaan/ArticleBundle/Entity/AbstractCategory.php b/src/Kunstmaan/ArticleBundle/Entity/AbstractCategory.php index f19b05829c..9dddaacfcd 100644 --- a/src/Kunstmaan/ArticleBundle/Entity/AbstractCategory.php +++ b/src/Kunstmaan/ArticleBundle/Entity/AbstractCategory.php @@ -15,7 +15,7 @@ class AbstractCategory extends AbstractEntity implements Translatable */ public function __construct() { - if (get_class($this) === AbstractCategory::class) { + if (\get_class($this) === AbstractCategory::class) { @trigger_error(sprintf('Instantiating the "%s" class is deprecated in KunstmaanArticleBundle 5.1 and will be made abstract in KunstmaanArticleBundle 6.0. Extend your implementation from this class instead.', __CLASS__), E_USER_DEPRECATED); } } diff --git a/src/Kunstmaan/ArticleBundle/Entity/AbstractTag.php b/src/Kunstmaan/ArticleBundle/Entity/AbstractTag.php index 8450ead574..7ca6e7529e 100644 --- a/src/Kunstmaan/ArticleBundle/Entity/AbstractTag.php +++ b/src/Kunstmaan/ArticleBundle/Entity/AbstractTag.php @@ -15,7 +15,7 @@ class AbstractTag extends AbstractEntity implements Translatable */ public function __construct() { - if (get_class($this) === AbstractTag::class) { + if (\get_class($this) === AbstractTag::class) { @trigger_error(sprintf('Instantiating the "%s" class is deprecated in KunstmaanArticleBundle 5.1 and will be made abstract in KunstmaanArticleBundle 6.0. Extend your implementation from this class instead.', __CLASS__), E_USER_DEPRECATED); } } diff --git a/src/Kunstmaan/ArticleBundle/Router/TagCategoryRouter.php b/src/Kunstmaan/ArticleBundle/Router/TagCategoryRouter.php index d11eaf81c4..6948cea5ae 100644 --- a/src/Kunstmaan/ArticleBundle/Router/TagCategoryRouter.php +++ b/src/Kunstmaan/ArticleBundle/Router/TagCategoryRouter.php @@ -3,7 +3,6 @@ namespace Kunstmaan\ArticleBundle\Router; use Kunstmaan\NodeBundle\Router\SlugRouter; -use Symfony\Component\Routing\Route; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Translation\TranslatorInterface; @@ -14,7 +13,7 @@ class TagCategoryRouter extends SlugRouter */ public function getRouteCollection() { - if (!is_null($this->routeCollection)) { + if (!\is_null($this->routeCollection)) { return $this->routeCollection; } $this->routeCollection = new RouteCollection(); diff --git a/src/Kunstmaan/ArticleBundle/Tests/unit/AdminList/AbstractArticleAuthorAdminListConfiguratorTest.php b/src/Kunstmaan/ArticleBundle/Tests/unit/AdminList/AbstractArticleAuthorAdminListConfiguratorTest.php index bf557dbc80..35d9823d5e 100644 --- a/src/Kunstmaan/ArticleBundle/Tests/unit/AdminList/AbstractArticleAuthorAdminListConfiguratorTest.php +++ b/src/Kunstmaan/ArticleBundle/Tests/unit/AdminList/AbstractArticleAuthorAdminListConfiguratorTest.php @@ -30,7 +30,7 @@ protected function setUp() $acl = $this->createMock(AclHelper::class); - $this->object = new AbstractArticleAuthorAdminListConfigurator($em, $acl, 'nl', 'admin'); + $this->object = new AbstractArticleAuthorAdminListConfigurator($em, $acl, 'nl'); } public function testGetters() diff --git a/src/Kunstmaan/ArticleBundle/Tests/unit/AdminList/AbstractArticlePageAdminListConfiguratorTest.php b/src/Kunstmaan/ArticleBundle/Tests/unit/AdminList/AbstractArticlePageAdminListConfiguratorTest.php index 36bc75fbfe..138134a833 100644 --- a/src/Kunstmaan/ArticleBundle/Tests/unit/AdminList/AbstractArticlePageAdminListConfiguratorTest.php +++ b/src/Kunstmaan/ArticleBundle/Tests/unit/AdminList/AbstractArticlePageAdminListConfiguratorTest.php @@ -107,7 +107,6 @@ public function testGetUrls() $this->assertEquals('KunstmaanNodeBundle_nodes_edit', $url['path']); $this->assertCount(1, $url['params']); $this->assertEquals(1314, $url['params']['id']); - $url = $this->object->getEditUrlFor($item); $url = $this->object->getDeleteUrlFor($item); diff --git a/src/Kunstmaan/ArticleBundle/Tests/unit/Entity/AbstractArticleOverviewPageTest.php b/src/Kunstmaan/ArticleBundle/Tests/unit/Entity/AbstractArticleOverviewPageTest.php index 42ef2c0b94..0e03dd83b4 100644 --- a/src/Kunstmaan/ArticleBundle/Tests/unit/Entity/AbstractArticleOverviewPageTest.php +++ b/src/Kunstmaan/ArticleBundle/Tests/unit/Entity/AbstractArticleOverviewPageTest.php @@ -23,7 +23,7 @@ public function testGettersAndSetters() $entity = new ArticleOverViewPage(); $this->assertEquals('KunstmaanArticleBundle:AbstractArticleOverviewPage:service', $entity->getControllerAction()); $this->assertEquals('KunstmaanArticleBundle:AbstractArticleOverviewPage:view.html.twig', $entity->getDefaultView()); - $this->assertTrue(is_array($entity->getPossibleChildTypes())); - $this->assertTrue(is_array($entity->getPagePartAdminConfigurations())); + $this->assertInternalType('array', $entity->getPossibleChildTypes()); + $this->assertInternalType('array', $entity->getPagePartAdminConfigurations()); } } diff --git a/src/Kunstmaan/ArticleBundle/Tests/unit/Entity/AbstractArticlePageTest.php b/src/Kunstmaan/ArticleBundle/Tests/unit/Entity/AbstractArticlePageTest.php index aec33fffca..ecd7a22441 100644 --- a/src/Kunstmaan/ArticleBundle/Tests/unit/Entity/AbstractArticlePageTest.php +++ b/src/Kunstmaan/ArticleBundle/Tests/unit/Entity/AbstractArticlePageTest.php @@ -31,7 +31,7 @@ public function testGettersAndSetters() $this->assertEquals('NASA', $entity->getTitle()); $this->assertInstanceOf(DateTime::class, $entity->getDate()); $this->assertEquals(AbstractArticlePageAdminType::class, $entity->getAdminType()); - $this->assertTrue(is_array($entity->getPossibleChildTypes())); - $this->assertTrue(is_array($entity->getPagePartAdminConfigurations())); + $this->assertInternalType('array', $entity->getPossibleChildTypes()); + $this->assertInternalType('array', $entity->getPagePartAdminConfigurations()); } } diff --git a/src/Kunstmaan/ArticleBundle/Tests/unit/PagePartAdmin/AbstractArticleOverviewPagePagePartAdminConfiguratorTest.php b/src/Kunstmaan/ArticleBundle/Tests/unit/PagePartAdmin/AbstractArticleOverviewPagePagePartAdminConfiguratorTest.php index caf6d78163..7ffb68ac8f 100644 --- a/src/Kunstmaan/ArticleBundle/Tests/unit/PagePartAdmin/AbstractArticleOverviewPagePagePartAdminConfiguratorTest.php +++ b/src/Kunstmaan/ArticleBundle/Tests/unit/PagePartAdmin/AbstractArticleOverviewPagePagePartAdminConfiguratorTest.php @@ -18,7 +18,7 @@ public function testGettersAndSetters() $this->assertEquals('main', $entity->getContext()); $this->assertEquals('', $entity->getWidgetTemplate()); $types = $entity->getPossiblePagePartTypes(); - $this->assertTrue(is_array($types)); + $this->assertInternalType('array', $types); foreach ($types as $type) { $this->assertArrayHasKey('name', $type); $this->assertArrayHasKey('class', $type); diff --git a/src/Kunstmaan/ArticleBundle/Tests/unit/PagePartAdmin/AbstractArticlePagePagePartAdminConfiguratorTest.php b/src/Kunstmaan/ArticleBundle/Tests/unit/PagePartAdmin/AbstractArticlePagePagePartAdminConfiguratorTest.php index 950b84c9fd..41e1b25819 100644 --- a/src/Kunstmaan/ArticleBundle/Tests/unit/PagePartAdmin/AbstractArticlePagePagePartAdminConfiguratorTest.php +++ b/src/Kunstmaan/ArticleBundle/Tests/unit/PagePartAdmin/AbstractArticlePagePagePartAdminConfiguratorTest.php @@ -18,7 +18,7 @@ public function testGettersAndSetters() $this->assertEquals('main', $entity->getContext()); $this->assertEquals('', $entity->getWidgetTemplate()); $types = $entity->getPossiblePagePartTypes(); - $this->assertTrue(is_array($types)); + $this->assertInternalType('array', $types); foreach ($types as $type) { $this->assertArrayHasKey('name', $type); $this->assertArrayHasKey('class', $type); diff --git a/src/Kunstmaan/ArticleBundle/Twig/ArticleTwigExtension.php b/src/Kunstmaan/ArticleBundle/Twig/ArticleTwigExtension.php index e141c18c36..00848a1efe 100644 --- a/src/Kunstmaan/ArticleBundle/Twig/ArticleTwigExtension.php +++ b/src/Kunstmaan/ArticleBundle/Twig/ArticleTwigExtension.php @@ -34,7 +34,7 @@ public function __construct(EntityManagerInterface $em, RouterInterface $router) $this->em = $em; $this->router = $router; - if (func_num_args() > 2) { + if (\func_num_args() > 2) { @trigger_error(sprintf('Passing the "request_stack" service as the third argument in "%s" is deprecated in KunstmaanArticleBundle 5.1 and will be removed in KunstmaanArticleBundle 6.0. Remove the "request_stack" argument from your service definition.', __METHOD__), E_USER_DEPRECATED); } } @@ -190,7 +190,7 @@ protected function articleRouteExists($type, $locale) $routeName = sprintf('_slug_%s_%s', $type, $locale); try { - return !is_null($this->router->getRouteCollection()->get($routeName)); + return !\is_null($this->router->getRouteCollection()->get($routeName)); } catch (\Exception $e) { return false; }