Skip to content

Commit

Permalink
Fix PHPStan issues
Browse files Browse the repository at this point in the history
  • Loading branch information
barw4 committed Sep 5, 2024
1 parent 82103ef commit 227db6c
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 234 deletions.
220 changes: 0 additions & 220 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ parameters:
count: 1
path: src/bundle/DependencyInjection/Compiler/OutputVisitorPass.php

-
message: "#^Method Ibexa\\\\Bundle\\\\Rest\\\\DependencyInjection\\\\Compiler\\\\ValueObjectVisitorPass\\:\\:process\\(\\) has no return type specified\\.$#"
count: 1
path: src/bundle/DependencyInjection/Compiler/ValueObjectVisitorPass.php

-
message: "#^Method Ibexa\\\\Bundle\\\\Rest\\\\DependencyInjection\\\\Configuration\\:\\:addRestRootResourcesSection\\(\\) has parameter \\$rootNode with no type specified\\.$#"
count: 1
Expand Down Expand Up @@ -405,26 +400,6 @@ parameters:
count: 1
path: src/contracts/Output/ValueObjectVisitor.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcher\\:\\:addVisitor\\(\\) has no return type specified\\.$#"
count: 1
path: src/contracts/Output/ValueObjectVisitorDispatcher.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcher\\:\\:setOutputGenerator\\(\\) has no return type specified\\.$#"
count: 1
path: src/contracts/Output/ValueObjectVisitorDispatcher.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcher\\:\\:setOutputVisitor\\(\\) has no return type specified\\.$#"
count: 1
path: src/contracts/Output/ValueObjectVisitorDispatcher.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) has no return type specified\\.$#"
count: 1
path: src/contracts/Output/Visitor.php

-
message: "#^Method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setStatus\\(\\) has no return type specified\\.$#"
count: 1
Expand All @@ -440,16 +415,6 @@ parameters:
count: 1
path: src/contracts/Output/Visitor.php

-
message: "#^Property Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:\\$statusCode \\(int\\) does not accept null\\.$#"
count: 1
path: src/contracts/Output/Visitor.php

-
message: "#^Property Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:\\$valueObjectVisitorDispatcher \\(Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcher\\) does not accept default value of type array\\.$#"
count: 1
path: src/contracts/Output/Visitor.php

-
message: "#^Method Ibexa\\\\Rest\\\\FieldTypeProcessor\\\\BaseRelationProcessor\\:\\:setLocationService\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -2540,11 +2505,6 @@ parameters:
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/ContentList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/ContentList.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\ContentTypeGroup\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
Expand All @@ -2560,11 +2520,6 @@ parameters:
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/ContentTypeGroupList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/ContentTypeGroupList.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\ContentTypeGroupRefList\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
Expand All @@ -2575,21 +2530,11 @@ parameters:
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/ContentTypeInfoList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/ContentTypeInfoList.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\ContentTypeList\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/ContentTypeList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/ContentTypeList.php

-
message: "#^Access to offset 'Alpha2' on an unknown class Ibexa\\\\Core\\\\Repository\\\\Values\\\\ContentType\\\\Countries\\.$#"
count: 2
Expand All @@ -2615,11 +2560,6 @@ parameters:
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/CountryList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/CountryList.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\CreatedContent\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -2830,11 +2770,6 @@ parameters:
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/FieldDefinitionList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/FieldDefinitionList.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\ImageVariation\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -2890,31 +2825,16 @@ parameters:
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/ObjectStateGroupList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/ObjectStateGroupList.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\ObjectStateList\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/ObjectStateList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/ObjectStateList.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\Options\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/Options.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, int given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/Options.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\PermanentRedirect\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
Expand All @@ -2940,11 +2860,6 @@ parameters:
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/PolicyList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/PolicyList.php

-
message: "#^Access to an undefined property Ibexa\\\\Rest\\\\Server\\\\Values\\\\RestRole\\:\\:\\$id\\.$#"
count: 1
Expand Down Expand Up @@ -3130,11 +3045,6 @@ parameters:
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/RoleList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/RoleList.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\Root\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
Expand All @@ -3155,11 +3065,6 @@ parameters:
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/SectionList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/SectionList.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\SeeOther\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -3235,41 +3140,21 @@ parameters:
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/UserGroupList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/UserGroupList.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\UserGroupRefList\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/UserGroupRefList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/UserGroupRefList.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\UserList\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/UserList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/UserList.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\UserRefList\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/UserRefList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/UserRefList.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\UserSession\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
Expand All @@ -3280,11 +3165,6 @@ parameters:
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/UserSession.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/UserSession.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\Version\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -3315,11 +3195,6 @@ parameters:
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/VersionList.php

-
message: "#^Parameter \\#2 \\$value of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor\\:\\:setHeader\\(\\) expects string, false given\\.$#"
count: 1
path: src/lib/Server/Output/ValueObjectVisitor/VersionList.php

-
message: "#^Method Ibexa\\\\Rest\\\\Server\\\\Output\\\\ValueObjectVisitor\\\\VersionTranslationInfo\\:\\:visit\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -3560,11 +3435,6 @@ parameters:
count: 1
path: tests/bundle/DependencyInjection/Compiler/OutputVisitorPassTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Bundle\\\\Rest\\\\DependencyInjection\\\\Compiler\\\\ValueObjectVisitorPassTest\\:\\:testProcess\\(\\) has no return type specified\\.$#"
count: 1
path: tests/bundle/DependencyInjection/Compiler/ValueObjectVisitorPassTest.php

-
message: "#^Parameter \\#2 \\$method of function method_exists expects string, array\\<int\\|string, int\\|string\\>\\|int\\|string given\\.$#"
count: 1
Expand Down Expand Up @@ -6685,101 +6555,11 @@ parameters:
count: 1
path: tests/lib/Output/ValueObjectVisitorBaseTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcherTest\\:\\:testVisitValueObject\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/ValueObjectVisitorDispatcherTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcherTest\\:\\:testVisitValueObjectInvalidType\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/ValueObjectVisitorDispatcherTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcherTest\\:\\:testVisitValueObjectNoMatch\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/ValueObjectVisitorDispatcherTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcherTest\\:\\:testVisitValueObjectParentMatch\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/ValueObjectVisitorDispatcherTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcherTest\\:\\:testVisitValueObjectSecondRuleParentMatch\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/ValueObjectVisitorDispatcherTest.php

-
message: "#^Parameter \\#1 \\$data of method Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcher\\:\\:visit\\(\\) expects object, int given\\.$#"
count: 1
path: tests/lib/Output/ValueObjectVisitorDispatcherTest.php

-
message: "#^Property Ibexa\\\\Tests\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcherTest\\:\\:\\$outputGeneratorMock \\(Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Generator&PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\) in isset\\(\\) is not nullable\\.$#"
count: 1
path: tests/lib/Output/ValueObjectVisitorDispatcherTest.php

-
message: "#^Property Ibexa\\\\Tests\\\\Rest\\\\Output\\\\ValueObjectVisitorDispatcherTest\\:\\:\\$outputVisitorMock \\(Ibexa\\\\Contracts\\\\Rest\\\\Output\\\\Visitor&PHPUnit\\\\Framework\\\\MockObject\\\\MockObject\\) in isset\\(\\) is not nullable\\.$#"
count: 1
path: tests/lib/Output/ValueObjectVisitorDispatcherTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\VisitorTest\\:\\:getGeneratorMock\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/VisitorTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\VisitorTest\\:\\:getVisitorMock\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/VisitorTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\VisitorTest\\:\\:testSetFilteredHeaders\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/VisitorTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\VisitorTest\\:\\:testSetHeaderResetAfterVisit\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/VisitorTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\VisitorTest\\:\\:testSetHeaders\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/VisitorTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\VisitorTest\\:\\:testSetHeadersNoOverwrite\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/VisitorTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\VisitorTest\\:\\:testSetStatusCode\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/VisitorTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\VisitorTest\\:\\:testSetStatusCodeNoOverride\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/VisitorTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\VisitorTest\\:\\:testVisitDocument\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/VisitorTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\VisitorTest\\:\\:testVisitEmptyDocument\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/VisitorTest.php

-
message: "#^Method Ibexa\\\\Tests\\\\Rest\\\\Output\\\\VisitorTest\\:\\:testVisitValueObject\\(\\) has no return type specified\\.$#"
count: 1
path: tests/lib/Output/VisitorTest.php

-
message: "#^Call to method setRequestParser\\(\\) on an unknown class Ibexa\\\\Rest\\\\Server\\\\Input\\\\Parser\\\\Base\\.$#"
count: 1
Expand Down
Loading

0 comments on commit 227db6c

Please sign in to comment.