Skip to content

Commit

Permalink
Finished reviewing baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
mnocon committed May 9, 2024
1 parent d1bc615 commit 069c68a
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 79 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion code_samples/api/rest_api/src/Rest/Values/Greeting.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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']]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion code_samples/back_office/images/src/SvgController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
70 changes: 0 additions & 70 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 069c68a

Please sign in to comment.