diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index e0cc17161c..a493aa0878 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1560,51 +1560,6 @@ parameters: count: 1 path: src/contracts/Permission/PermissionCheckerInterface.php - - - message: "#^Method Ibexa\\\\Contracts\\\\AdminUi\\\\Tab\\\\AbstractControllerBasedTab\\:\\:getControllerReference\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Tab/AbstractControllerBasedTab.php - - - - message: "#^Method Ibexa\\\\Contracts\\\\AdminUi\\\\Tab\\\\AbstractControllerBasedTab\\:\\:renderView\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Tab/AbstractControllerBasedTab.php - - - - message: "#^Method Ibexa\\\\Contracts\\\\AdminUi\\\\Tab\\\\AbstractEventDispatchingTab\\:\\:renderView\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Tab/AbstractEventDispatchingTab.php - - - - message: "#^Method Ibexa\\\\Contracts\\\\AdminUi\\\\Tab\\\\AbstractRouteBasedTab\\:\\:getRouteName\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Tab/AbstractRouteBasedTab.php - - - - message: "#^Method Ibexa\\\\Contracts\\\\AdminUi\\\\Tab\\\\AbstractRouteBasedTab\\:\\:getRouteParameters\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Tab/AbstractRouteBasedTab.php - - - - message: "#^Method Ibexa\\\\Contracts\\\\AdminUi\\\\Tab\\\\AbstractRouteBasedTab\\:\\:getRouteParameters\\(\\) return type has no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Tab/AbstractRouteBasedTab.php - - - - message: "#^Method Ibexa\\\\Contracts\\\\AdminUi\\\\Tab\\\\AbstractRouteBasedTab\\:\\:renderView\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Tab/AbstractRouteBasedTab.php - - - - message: "#^Method Ibexa\\\\Contracts\\\\AdminUi\\\\Tab\\\\ConditionalTabInterface\\:\\:evaluate\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Tab/ConditionalTabInterface.php - - - - message: "#^Method Ibexa\\\\Contracts\\\\AdminUi\\\\Tab\\\\TabInterface\\:\\:renderView\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/contracts/Tab/TabInterface.php - - message: "#^Method Ibexa\\\\Contracts\\\\AdminUi\\\\UniversalDiscovery\\\\Provider\\:\\:getBreadcrumbLocations\\(\\) return type has no value type specified in iterable type array\\.$#" count: 1 @@ -8835,31 +8790,16 @@ parameters: count: 1 path: src/lib/Tab/Dashboard/AbstractMediaTab.php - - - message: "#^Method Ibexa\\\\AdminUi\\\\Tab\\\\Dashboard\\\\EveryoneContentTab\\:\\:renderView\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/Tab/Dashboard/EveryoneContentTab.php - - message: "#^Parameter \\#1 \\$query of class Ibexa\\\\Core\\\\Pagination\\\\Pagerfanta\\\\LocationSearchAdapter constructor expects Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\LocationQuery, Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Query given\\.$#" count: 1 path: src/lib/Tab/Dashboard/EveryoneContentTab.php - - - message: "#^Method Ibexa\\\\AdminUi\\\\Tab\\\\Dashboard\\\\EveryoneMediaTab\\:\\:renderView\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/Tab/Dashboard/EveryoneMediaTab.php - - message: "#^Parameter \\#1 \\$query of class Ibexa\\\\Core\\\\Pagination\\\\Pagerfanta\\\\LocationSearchAdapter constructor expects Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\LocationQuery, Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Query given\\.$#" count: 1 path: src/lib/Tab/Dashboard/EveryoneMediaTab.php - - - message: "#^Method Ibexa\\\\AdminUi\\\\Tab\\\\Dashboard\\\\MyContentTab\\:\\:renderView\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/Tab/Dashboard/MyContentTab.php - - message: "#^Parameter \\#1 \\$query of class Ibexa\\\\Core\\\\Pagination\\\\Pagerfanta\\\\LocationSearchAdapter constructor expects Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\LocationQuery, Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Query given\\.$#" count: 1 @@ -8880,11 +8820,6 @@ parameters: count: 1 path: src/lib/Tab/Dashboard/MyDraftsTab.php - - - message: "#^Method Ibexa\\\\AdminUi\\\\Tab\\\\Dashboard\\\\MyMediaTab\\:\\:renderView\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/Tab/Dashboard/MyMediaTab.php - - message: "#^Parameter \\#1 \\$query of class Ibexa\\\\Core\\\\Pagination\\\\Pagerfanta\\\\LocationSearchAdapter constructor expects Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\LocationQuery, Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Query given\\.$#" count: 1 @@ -9180,11 +9115,6 @@ parameters: count: 1 path: src/lib/Tab/URLManagement/LinkManagerTab.php - - - message: "#^Method Ibexa\\\\AdminUi\\\\Tab\\\\URLManagement\\\\LinkManagerTab\\:\\:renderView\\(\\) has parameter \\$parameters with no value type specified in iterable type array\\.$#" - count: 1 - path: src/lib/Tab/URLManagement/LinkManagerTab.php - - message: "#^Property Ibexa\\\\AdminUi\\\\Tab\\\\URLManagement\\\\LinkManagerTab\\:\\:\\$notificationHandler is never read, only written\\.$#" count: 1 diff --git a/src/contracts/Tab/AbstractControllerBasedTab.php b/src/contracts/Tab/AbstractControllerBasedTab.php index 93cf18442b..1c9ad17ebc 100644 --- a/src/contracts/Tab/AbstractControllerBasedTab.php +++ b/src/contracts/Tab/AbstractControllerBasedTab.php @@ -21,11 +21,6 @@ abstract class AbstractControllerBasedTab extends AbstractTab /** @var \Symfony\Bridge\Twig\Extension\HttpKernelRuntime */ protected $httpKernelRuntime; - /** - * @param \Twig\Environment $twig - * @param \Symfony\Contracts\Translation\TranslatorInterface $translator - * @param \Symfony\Bridge\Twig\Extension\HttpKernelRuntime $httpKernelRuntime - */ public function __construct( Environment $twig, TranslatorInterface $translator, @@ -44,9 +39,7 @@ public function renderView(array $parameters): string /** * Returns ControllerReference used to render the tab. * - * @param array $parameters - * - * @return \Symfony\Component\HttpKernel\Controller\ControllerReference + * @param array $parameters */ abstract public function getControllerReference(array $parameters): ControllerReference; } diff --git a/src/contracts/Tab/AbstractEventDispatchingTab.php b/src/contracts/Tab/AbstractEventDispatchingTab.php index 1506f07993..09f1bdbd07 100644 --- a/src/contracts/Tab/AbstractEventDispatchingTab.php +++ b/src/contracts/Tab/AbstractEventDispatchingTab.php @@ -15,7 +15,7 @@ use Twig\Environment; /** - * Base class representing Tab using EventDisaptcher for extensibility. + * Base class representing Tab using EventDispatcher for extensibility. * * It extends AbstractTab by adding Event Dispatching before rendering view. */ @@ -24,11 +24,6 @@ abstract class AbstractEventDispatchingTab extends AbstractTab /** @var \Symfony\Component\EventDispatcher\EventDispatcherInterface */ protected $eventDispatcher; - /** - * @param \Twig\Environment $twig - * @param \Symfony\Contracts\Translation\TranslatorInterface $translator - * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher - */ public function __construct( Environment $twig, TranslatorInterface $translator, @@ -39,9 +34,6 @@ public function __construct( $this->eventDispatcher = $eventDispatcher; } - /** - * {@inheritdoc} - */ public function renderView(array $parameters): string { $event = new TabViewRenderEvent( @@ -57,15 +49,12 @@ public function renderView(array $parameters): string ); } - /** - * @return string - */ abstract public function getTemplate(): string; /** - * @param mixed[] $contextParameters + * @param array $contextParameters * - * @return mixed[] + * @return array */ abstract public function getTemplateParameters(array $contextParameters = []): array; } diff --git a/src/contracts/Tab/AbstractRouteBasedTab.php b/src/contracts/Tab/AbstractRouteBasedTab.php index 9597e23e51..961577a4a3 100644 --- a/src/contracts/Tab/AbstractRouteBasedTab.php +++ b/src/contracts/Tab/AbstractRouteBasedTab.php @@ -24,12 +24,6 @@ abstract class AbstractRouteBasedTab extends AbstractTab /** @var \Symfony\Bridge\Twig\Extension\HttpKernelRuntime */ private $httpKernelRuntime; - /** - * @param \Twig\Environment $twig - * @param \Symfony\Contracts\Translation\TranslatorInterface $translator - * @param \Symfony\Component\Routing\Generator\UrlGeneratorInterface $urlGenerator - * @param \Symfony\Bridge\Twig\Extension\HttpKernelRuntime $httpKernelRuntime - */ public function __construct( Environment $twig, TranslatorInterface $translator, @@ -55,18 +49,16 @@ public function renderView(array $parameters): string /** * Returns route name used to generate path to the resource. * - * @param array $parameters - * - * @return string + * @param array $parameters */ abstract public function getRouteName(array $parameters): string; /** * Returns parameters array required to generate path using the router. * - * @param array $parameters + * @param array $parameters * - * @return array + * @return array */ abstract public function getRouteParameters(array $parameters): array; } diff --git a/src/contracts/Tab/AbstractTab.php b/src/contracts/Tab/AbstractTab.php index dfd6bf88c6..edb71ea566 100644 --- a/src/contracts/Tab/AbstractTab.php +++ b/src/contracts/Tab/AbstractTab.php @@ -23,10 +23,6 @@ abstract class AbstractTab implements TabInterface /** @var \Symfony\Contracts\Translation\TranslatorInterface */ protected $translator; - /** - * @param \Twig\Environment $twig - * @param \Symfony\Contracts\Translation\TranslatorInterface $translator - */ public function __construct(Environment $twig, TranslatorInterface $translator) { $this->twig = $twig; diff --git a/src/contracts/Tab/ConditionalTabInterface.php b/src/contracts/Tab/ConditionalTabInterface.php index 2af4322d51..01bb3c7364 100644 --- a/src/contracts/Tab/ConditionalTabInterface.php +++ b/src/contracts/Tab/ConditionalTabInterface.php @@ -10,16 +10,14 @@ /** * Conditional Tab interface needs to be implemented by tabs, - * which needs to be evaluate depends on context. + * which needs to be evaluated depending on the context. */ interface ConditionalTabInterface { /** * Get information about tab presence. * - * @param array $parameters - * - * @return bool + * @param array $parameters */ public function evaluate(array $parameters): bool; } diff --git a/src/contracts/Tab/OrderedTabInterface.php b/src/contracts/Tab/OrderedTabInterface.php index 5160b34810..96eeb3cf03 100644 --- a/src/contracts/Tab/OrderedTabInterface.php +++ b/src/contracts/Tab/OrderedTabInterface.php @@ -17,8 +17,6 @@ interface OrderedTabInterface { /** * Get the order of this tab. - * - * @return int */ public function getOrder(): int; } diff --git a/src/contracts/Tab/TabInterface.php b/src/contracts/Tab/TabInterface.php index 85706fe4c5..11ddc0b756 100644 --- a/src/contracts/Tab/TabInterface.php +++ b/src/contracts/Tab/TabInterface.php @@ -16,24 +16,18 @@ interface TabInterface { /** * Returns identifier of the tab. - * - * @return string */ public function getIdentifier(): string; /** * Returns name of the tab which is displayed as a tab's title in the UI. - * - * @return string */ public function getName(): string; /** * Returns HTML body of the tab. * - * @param array $parameters - * - * @return string + * @param array $parameters */ public function renderView(array $parameters): string; }