diff --git a/code_samples/api/rest_api/src/Rest/InputParser/GreetingInput.php b/code_samples/api/rest_api/src/Rest/InputParser/GreetingInput.php index d922bb09fe..aa39a04e85 100644 --- a/code_samples/api/rest_api/src/Rest/InputParser/GreetingInput.php +++ b/code_samples/api/rest_api/src/Rest/InputParser/GreetingInput.php @@ -5,7 +5,7 @@ use App\Rest\Values\Greeting; use Ibexa\Contracts\Rest\Input\ParsingDispatcher; use Ibexa\Rest\Input\BaseParser; -use Ibexa\Rest\Server\Exceptions; +use Ibexa\Contracts\Rest\Exceptions; class GreetingInput extends BaseParser { diff --git a/code_samples/api/rest_api/src/Rest/Output/ValueObjectVisitorDispatcher.php b/code_samples/api/rest_api/src/Rest/Output/ValueObjectVisitorDispatcher.php index 8dab8dc14d..c07ed3dabe 100644 --- a/code_samples/api/rest_api/src/Rest/Output/ValueObjectVisitorDispatcher.php +++ b/code_samples/api/rest_api/src/Rest/Output/ValueObjectVisitorDispatcher.php @@ -25,13 +25,13 @@ public function __construct(iterable $visitors, BaseValueObjectVisitorDispatcher $this->valueObjectVisitorDispatcher = $valueObjectVisitorDispatcher; } - public function setOutputVisitor(Visitor $outputVisitor) + public function setOutputVisitor(Visitor $outputVisitor): void { $this->outputVisitor = $outputVisitor; $this->valueObjectVisitorDispatcher->setOutputVisitor($outputVisitor); } - public function setOutputGenerator(Generator $outputGenerator) + public function setOutputGenerator(Generator $outputGenerator): void { $this->outputGenerator = $outputGenerator; $this->valueObjectVisitorDispatcher->setOutputGenerator($outputGenerator); diff --git a/code_samples/api/rest_api/src/Rest/Values/Greeting.php b/code_samples/api/rest_api/src/Rest/Values/Greeting.php index 81a126b786..3052899209 100644 --- a/code_samples/api/rest_api/src/Rest/Values/Greeting.php +++ b/code_samples/api/rest_api/src/Rest/Values/Greeting.php @@ -8,7 +8,7 @@ class Greeting public string $recipient; - public function __construct($salutation = 'Hello', $recipient = 'World') + public function __construct(string $salutation = 'Hello', string $recipient = 'World') { $this->salutation = $salutation; $this->recipient = $recipient; diff --git a/code_samples/back_office/content_type/src/EventListener/TextAnchorMenuTabListener.php b/code_samples/back_office/content_type/src/EventListener/TextAnchorMenuTabListener.php index 5f9a58cf48..227c13670b 100644 --- a/code_samples/back_office/content_type/src/EventListener/TextAnchorMenuTabListener.php +++ b/code_samples/back_office/content_type/src/EventListener/TextAnchorMenuTabListener.php @@ -19,10 +19,10 @@ public function onAnchorMenuConfigure(ConfigureMenuEvent $event): void $menu = $event->getMenu(); // if you need to access "Content" tab, use ITEM__CONTENT constant: - $menu[ContentEditAnchorMenuBuilder::ITEM__CONTENT]; + $contentTab = $menu[ContentEditAnchorMenuBuilder::ITEM__CONTENT]; // if you need to access "Meta" tab, use ITEM__META constant: - $menu[ContentEditAnchorMenuBuilder::ITEM__META]; + $metaTab = $menu[ContentEditAnchorMenuBuilder::ITEM__META]; // Adding new tab called "New tab" $menu->addChild('New tab', ['attributes' => ['data-target-id' => 'ibexa-edit-content-sections-new-tab']]); diff --git a/code_samples/back_office/dashboard/article_tab/src/Tab/Dashboard/Everyone/EveryoneArticleTab.php b/code_samples/back_office/dashboard/article_tab/src/Tab/Dashboard/Everyone/EveryoneArticleTab.php index 0d24337806..f3f9bd559f 100644 --- a/code_samples/back_office/dashboard/article_tab/src/Tab/Dashboard/Everyone/EveryoneArticleTab.php +++ b/code_samples/back_office/dashboard/article_tab/src/Tab/Dashboard/Everyone/EveryoneArticleTab.php @@ -16,9 +16,9 @@ class EveryoneArticleTab extends AbstractTab implements OrderedTabInterface { - protected $pagerContentToDataMapper; + protected PagerContentToDataMapper $pagerContentToDataMapper; - protected $searchService; + protected SearchService $searchService; public function __construct( Environment $twig, diff --git a/code_samples/back_office/images/src/SvgController.php b/code_samples/back_office/images/src/SvgController.php index 7e1c37350e..b2ea7be6d1 100644 --- a/code_samples/back_office/images/src/SvgController.php +++ b/code_samples/back_office/images/src/SvgController.php @@ -48,7 +48,7 @@ public function downloadSvgAction( $version = null; if ($request->query->has('version')) { - $version = $request->query->get('version'); + $version = (int)$request->query->get('version'); } $content = $this->contentService->loadContent($contentId, null, $version); diff --git a/composer.json b/composer.json index bcf37b3126..6a73286030 100644 --- a/composer.json +++ b/composer.json @@ -41,6 +41,7 @@ "ibexa/taxonomy": "5.0.x-dev", "ibexa/scheduler": "5.0.x-dev", "ibexa/cron": "5.0.x-dev", + "ibexa/dashboard": "5.0.x-dev", "ibexa/corporate-account": "5.0.x-dev", "ibexa/fieldtype-address": "5.0.x-dev", "ibexa/segmentation": "5.0.x-dev", diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index cbfc76a549..eddd8fbb4e 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -135,31 +135,11 @@ parameters: count: 1 path: code_samples/api/rest_api/create_image.xml.php - - - message: "#^Instantiated class Ibexa\\\\Rest\\\\Server\\\\Exceptions\\\\Parser not found\\.$#" - count: 1 - path: code_samples/api/rest_api/src/Rest/InputParser/GreetingInput.php - - - - message: "#^Throwing object of an unknown class Ibexa\\\\Rest\\\\Server\\\\Exceptions\\\\Parser\\.$#" - count: 1 - path: code_samples/api/rest_api/src/Rest/InputParser/GreetingInput.php - - message: "#^Method App\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcher\\:\\:__construct\\(\\) has parameter \\$visitors with no value type specified in iterable type iterable\\.$#" count: 1 path: code_samples/api/rest_api/src/Rest/Output/ValueObjectVisitorDispatcher.php - - - message: "#^Method App\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcher\\:\\:setOutputGenerator\\(\\) has no return type specified\\.$#" - count: 1 - path: code_samples/api/rest_api/src/Rest/Output/ValueObjectVisitorDispatcher.php - - - - message: "#^Method App\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcher\\:\\:setOutputVisitor\\(\\) has no return type specified\\.$#" - count: 1 - path: code_samples/api/rest_api/src/Rest/Output/ValueObjectVisitorDispatcher.php - - message: "#^Property App\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcher\\:\\:\\$visitors type has no value type specified in iterable type array\\.$#" count: 1 @@ -185,16 +165,6 @@ parameters: count: 1 path: code_samples/api/rest_api/src/Rest/ValueObjectVisitor/RestLocation.php - - - message: "#^Method App\\\\Rest\\\\Values\\\\Greeting\\:\\:__construct\\(\\) has parameter \\$recipient with no type specified\\.$#" - count: 1 - path: code_samples/api/rest_api/src/Rest/Values/Greeting.php - - - - message: "#^Method App\\\\Rest\\\\Values\\\\Greeting\\:\\:__construct\\(\\) has parameter \\$salutation with no type specified\\.$#" - count: 1 - path: code_samples/api/rest_api/src/Rest/Values/Greeting.php - - message: "#^Parameter \\#1 \\$json of function json_decode expects string, string\\|false given\\.$#" count: 1 @@ -210,51 +180,11 @@ parameters: count: 1 path: code_samples/back_office/content_type/src/EventListener/TextAnchorMenuTabListener.php - - - message: "#^Expression \"\\$menu\\[\\\\Ibexa\\\\AdminUi\\\\Menu\\\\ContentEditAnchorMenuBuilder\\:\\:ITEM__CONTENT\\]\" on a separate line does not do anything\\.$#" - count: 1 - path: code_samples/back_office/content_type/src/EventListener/TextAnchorMenuTabListener.php - - - - message: "#^Expression \"\\$menu\\[\\\\Ibexa\\\\AdminUi\\\\Menu\\\\ContentEditAnchorMenuBuilder\\:\\:ITEM__META\\]\" on a separate line does not do anything\\.$#" - count: 1 - path: code_samples/back_office/content_type/src/EventListener/TextAnchorMenuTabListener.php - - - - message: "#^Property App\\\\Tab\\\\Dashboard\\\\Everyone\\\\EveryoneArticleTab\\:\\:\\$pagerContentToDataMapper has no type specified\\.$#" - count: 1 - path: code_samples/back_office/dashboard/article_tab/src/Tab/Dashboard/Everyone/EveryoneArticleTab.php - - - - message: "#^Property App\\\\Tab\\\\Dashboard\\\\Everyone\\\\EveryoneArticleTab\\:\\:\\$searchService has no type specified\\.$#" - count: 1 - path: code_samples/back_office/dashboard/article_tab/src/Tab/Dashboard/Everyone/EveryoneArticleTab.php - - - - message: "#^Call to method createCustomDashboardDraft\\(\\) on an unknown class Ibexa\\\\Contracts\\\\Dashboard\\\\DashboardServiceInterface\\.$#" - count: 1 - path: code_samples/back_office/dashboard/src/Command/DashboardCommand.php - - - - message: "#^Parameter \\$dashboardService of method App\\\\Command\\\\DashboardCommand\\:\\:__construct\\(\\) has invalid type Ibexa\\\\Contracts\\\\Dashboard\\\\DashboardServiceInterface\\.$#" - count: 1 - path: code_samples/back_office/dashboard/src/Command/DashboardCommand.php - - - - message: "#^Property App\\\\Command\\\\DashboardCommand\\:\\:\\$dashboardService has unknown class Ibexa\\\\Contracts\\\\Dashboard\\\\DashboardServiceInterface as its type\\.$#" - count: 1 - path: code_samples/back_office/dashboard/src/Command/DashboardCommand.php - - message: "#^Method Ibexa\\\\Bundle\\\\Core\\\\Imagine\\\\PlaceholderProvider\\:\\:getPlaceholder\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#" count: 1 path: code_samples/back_office/images/src/PlaceholderProvider.php - - - message: "#^Parameter \\#3 \\$versionNo of method Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\ContentService\\:\\:loadContent\\(\\) expects int\\|null, string\\|null given\\.$#" - count: 1 - path: code_samples/back_office/images/src/SvgController.php - - message: "#^Return type \\(bool\\) of method App\\\\Security\\\\Limitation\\\\Mapper\\\\CustomLimitationValueMapper\\:\\:mapLimitationValue\\(\\) should be compatible with return type \\(array\\) of method Ibexa\\\\AdminUi\\\\Limitation\\\\LimitationValueMapperInterface\\:\\:mapLimitationValue\\(\\)$#" count: 1