Skip to content

Commit

Permalink
Update phpstan / psalm baseline
Browse files Browse the repository at this point in the history
  • Loading branch information
core23 committed Oct 2, 2022
1 parent b6c0ca7 commit 539d8c6
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 5 deletions.
48 changes: 44 additions & 4 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,41 @@ parameters:
count: 1
path: src/Admin/Model/GroupAdmin.php

-
message: "#^PHPDoc tag @param for parameter \\$class with type class\\-string\\<Nucleos\\\\UserBundle\\\\Model\\\\GroupInterface\\>\\|Nucleos\\\\UserBundle\\\\Model\\\\GroupManager is not subtype of native type string\\|null\\.$#"
count: 1
path: src/Admin/Model/GroupAdmin.php

-
message: "#^Parameter \\#2 \\$class of method Sonata\\\\AdminBundle\\\\DependencyInjection\\\\Admin\\\\AbstractTaggedAdmin\\<Nucleos\\\\UserBundle\\\\Model\\\\GroupInterface\\>\\:\\:__construct\\(\\) expects class\\-string\\<Nucleos\\\\UserBundle\\\\Model\\\\GroupInterface\\>\\|null, string\\|null given\\.$#"
count: 1
path: src/Admin/Model/GroupAdmin.php

-
message: "#^Property Nucleos\\\\UserAdminBundle\\\\Admin\\\\Model\\\\GroupAdmin\\:\\:\\$groupManager \\(Nucleos\\\\UserBundle\\\\Model\\\\GroupManager\\) does not accept Nucleos\\\\UserBundle\\\\Model\\\\GroupManager\\|null\\.$#"
count: 1
path: src/Admin/Model/GroupAdmin.php

-
message: "#^Property Nucleos\\\\UserAdminBundle\\\\Admin\\\\Model\\\\GroupAdmin\\:\\:\\$groupManager with generic interface Nucleos\\\\UserBundle\\\\Model\\\\GroupManager does not specify its types\\: GroupTemplate$#"
count: 1
path: src/Admin/Model/GroupAdmin.php

-
message: "#^PHPDoc tag @param for parameter \\$class with type class\\-string\\<Nucleos\\\\UserBundle\\\\Model\\\\UserInterface\\>\\|Nucleos\\\\UserBundle\\\\Model\\\\UserManager is not subtype of native type string\\|null\\.$#"
count: 1
path: src/Admin/Model/UserAdmin.php

-
message: "#^Parameter \\#2 \\$class of method Sonata\\\\AdminBundle\\\\DependencyInjection\\\\Admin\\\\AbstractTaggedAdmin\\<Nucleos\\\\UserBundle\\\\Model\\\\UserInterface\\>\\:\\:__construct\\(\\) expects class\\-string\\<Nucleos\\\\UserBundle\\\\Model\\\\UserInterface\\>\\|null, string\\|null given\\.$#"
count: 1
path: src/Admin/Model/UserAdmin.php

-
message: "#^Property Nucleos\\\\UserAdminBundle\\\\Admin\\\\Model\\\\UserAdmin\\:\\:\\$userManager \\(Nucleos\\\\UserBundle\\\\Model\\\\UserManager\\) does not accept Nucleos\\\\UserBundle\\\\Model\\\\UserManager\\|null\\.$#"
count: 1
path: src/Admin/Model/UserAdmin.php

-
message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:children\\(\\)\\.$#"
count: 4
Expand Down Expand Up @@ -71,7 +101,7 @@ parameters:
path: src/Security/EditableRolesBuilder.php

-
message: "#^Call to function is_array\\(\\) with array\\<array\\{admin\\?\\: string, label\\: string, roles\\: array\\<int, string\\>, route\\: string, route_absolute\\: bool, route_params\\: array\\<string, string\\>\\}\\> will always evaluate to true\\.$#"
message: "#^Call to function is_array\\(\\) with array\\<int, array\\{admin\\: string, roles\\: array\\<int, string\\>, route_absolute\\: bool, route_params\\: array\\<string, string\\>\\}\\|array\\{label\\: string, roles\\: array\\<int, string\\>, route\\: string, route_absolute\\: bool, route_params\\: array\\<string, string\\>\\}\\> will always evaluate to true\\.$#"
count: 1
path: src/Security/RolesBuilder/AdminRolesBuilder.php

Expand All @@ -95,6 +125,11 @@ parameters:
count: 1
path: src/Security/RolesBuilder/AdminRolesBuilder.php

-
message: "#^Parameter \\#1 \\$items of method Nucleos\\\\UserAdminBundle\\\\Security\\\\RolesBuilder\\\\AdminRolesBuilder\\:\\:hasGroupAdmin\\(\\) expects array\\<string, mixed\\>, array\\<int, array\\<string, array\\<int\\|string, string\\>\\|bool\\|string\\>\\> given\\.$#"
count: 1
path: src/Security/RolesBuilder/AdminRolesBuilder.php

-
message: "#^Method Nucleos\\\\UserAdminBundle\\\\Security\\\\RolesBuilder\\\\ExpandableRolesBuilderInterface\\:\\:getExpandedRoles\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -120,6 +155,11 @@ parameters:
count: 1
path: tests/Action/LoginActionTest.php

-
message: "#^Call to function method_exists\\(\\) with 'Symfony\\\\\\\\Component\\\\\\\\Security\\\\\\\\Core\\\\\\\\User\\\\\\\\UserProviderInterface' and 'loadUserByIdentifier' will always evaluate to true\\.$#"
count: 1
path: tests/Action/SendEmailActionTest.php

-
message: "#^Method Nucleos\\\\UserAdminBundle\\\\Tests\\\\Fixtures\\\\PoolMockFactory\\:\\:create\\(\\) has parameter \\$adminServiceIds with generic interface Sonata\\\\AdminBundle\\\\Admin\\\\AdminInterface but does not specify its types\\: T$#"
count: 1
Expand All @@ -131,12 +171,12 @@ parameters:
path: tests/Resources/XliffTest.php

-
message: "#^Parameter \\#3 \\$options of class Sonata\\\\AdminBundle\\\\SonataConfiguration constructor expects array\\{confirm_exit\\: bool, default_group\\: string, default_icon\\: string, default_label_catalogue\\: string, dropdown_number_groups_per_colums\\: int, form_type\\: 'horizontal'\\|'standard', html5_validate\\: bool, javascripts\\: array\\<int, string\\>, \\.\\.\\.\\}, array\\{\\} given\\.$#"
message: "#^Parameter \\#3 \\$options of class Sonata\\\\AdminBundle\\\\SonataConfiguration constructor expects array\\{confirm_exit\\: bool, default_admin_route\\: string, default_group\\: string, default_icon\\: string, default_translation_domain\\: string, dropdown_number_groups_per_colums\\: int, form_type\\: 'horizontal'\\|'standard', html5_validate\\: bool, \\.\\.\\.\\}, array\\{\\} given\\.$#"
count: 3
path: tests/Security/Authorization/Voter/EditableRolesBuilderTest.php

-
message: "#^Parameter \\#3 \\$options of class Sonata\\\\AdminBundle\\\\SonataConfiguration constructor expects array\\{confirm_exit\\: bool, default_group\\: string, default_icon\\: string, default_label_catalogue\\: string, dropdown_number_groups_per_colums\\: int, form_type\\: 'horizontal'\\|'standard', html5_validate\\: bool, javascripts\\: array\\<int, string\\>, \\.\\.\\.\\}, array\\{\\} given\\.$#"
message: "#^Parameter \\#3 \\$options of class Sonata\\\\AdminBundle\\\\SonataConfiguration constructor expects array\\{confirm_exit\\: bool, default_admin_route\\: string, default_group\\: string, default_icon\\: string, default_translation_domain\\: string, dropdown_number_groups_per_colums\\: int, form_type\\: 'horizontal'\\|'standard', html5_validate\\: bool, \\.\\.\\.\\}, array\\{\\} given\\.$#"
count: 1
path: tests/Security/RolesBuilder/AdminRolesBuilderTest.php

Expand All @@ -151,7 +191,7 @@ parameters:
path: tests/Security/RolesBuilder/AdminRolesBuilderTest.php

-
message: "#^Parameter \\#3 \\$options of class Sonata\\\\AdminBundle\\\\SonataConfiguration constructor expects array\\{confirm_exit\\: bool, default_group\\: string, default_icon\\: string, default_label_catalogue\\: string, dropdown_number_groups_per_colums\\: int, form_type\\: 'horizontal'\\|'standard', html5_validate\\: bool, javascripts\\: array\\<int, string\\>, \\.\\.\\.\\}, array\\{role_super_admin\\: 'ROLE_SUPER_ADMIN', role_admin\\: 'ROLE_SONATA_ADMIN'\\} given\\.$#"
message: "#^Parameter \\#3 \\$options of class Sonata\\\\AdminBundle\\\\SonataConfiguration constructor expects array\\{confirm_exit\\: bool, default_admin_route\\: string, default_group\\: string, default_icon\\: string, default_translation_domain\\: string, dropdown_number_groups_per_colums\\: int, form_type\\: 'horizontal'\\|'standard', html5_validate\\: bool, \\.\\.\\.\\}, array\\{role_super_admin\\: 'ROLE_SUPER_ADMIN', role_admin\\: 'ROLE_SONATA_ADMIN'\\} given\\.$#"
count: 1
path: tests/Security/RolesBuilder/SecurityRolesBuilderTest.php

Expand Down
32 changes: 31 additions & 1 deletion psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="4.13.1@5cf660f63b548ccd4a56f62d916ee4d6028e01a3">
<files psalm-version="4.20.0@f82a70e7edfc6cf2705e9374c8a0b6a974a779ed">
<file src="src/Action/CheckEmailAction.php">
<InvalidArgument occurrences="1">
<code>$username</code>
</InvalidArgument>
</file>
<file src="src/Action/ResetAction.php">
<PossiblyUndefinedMethod occurrences="1">
<code>getFlashBag</code>
</PossiblyUndefinedMethod>
</file>
<file src="src/Admin/Model/GroupAdmin.php">
<MismatchingDocblockParamType occurrences="1">
<code>GroupManager|class-string&lt;GroupInterface&gt;</code>
</MismatchingDocblockParamType>
<PossiblyInvalidArgument occurrences="1">
<code>$class</code>
</PossiblyInvalidArgument>
<PossiblyNullPropertyAssignmentValue occurrences="1">
<code>$groupManager</code>
</PossiblyNullPropertyAssignmentValue>
</file>
<file src="src/Admin/Model/UserAdmin.php">
<MismatchingDocblockParamType occurrences="1">
<code>UserManager|class-string&lt;UserInterface&gt;</code>
</MismatchingDocblockParamType>
<PossiblyInvalidArgument occurrences="1">
<code>$class</code>
</PossiblyInvalidArgument>
<PossiblyNullPropertyAssignmentValue occurrences="1">
<code>$userManager</code>
</PossiblyNullPropertyAssignmentValue>
</file>
<file src="src/DependencyInjection/Configuration.php">
<UndefinedMethod occurrences="4">
<code>children</code>
Expand Down Expand Up @@ -41,6 +68,9 @@
<InvalidReturnType occurrences="1">
<code>string[]</code>
</InvalidReturnType>
<InvalidScalarArgument occurrences="1">
<code>$groupData['items']</code>
</InvalidScalarArgument>
</file>
<file src="src/Security/RolesBuilder/SecurityRolesBuilder.php">
<InvalidArgument occurrences="4">
Expand Down

0 comments on commit 539d8c6

Please sign in to comment.