From 539d8c62bb40f11dc49bacfbed4a07aafac36e11 Mon Sep 17 00:00:00 2001 From: core23 Date: Sun, 2 Oct 2022 11:15:41 +0200 Subject: [PATCH] Update phpstan / psalm baseline --- phpstan-baseline.neon | 48 +++++++++++++++++++++++++++++++++++++++---- psalm-baseline.xml | 32 ++++++++++++++++++++++++++++- 2 files changed, 75 insertions(+), 5 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 919abbdb..e63343ac 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -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\\\\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\\\\:\\:__construct\\(\\) expects class\\-string\\\\|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\\\\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\\\\:\\:__construct\\(\\) expects class\\-string\\\\|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 @@ -71,7 +101,7 @@ parameters: path: src/Security/EditableRolesBuilder.php - - message: "#^Call to function is_array\\(\\) with array\\, route\\: string, route_absolute\\: bool, route_params\\: array\\\\}\\> will always evaluate to true\\.$#" + message: "#^Call to function is_array\\(\\) with array\\, route_absolute\\: bool, route_params\\: array\\\\}\\|array\\{label\\: string, roles\\: array\\, route\\: string, route_absolute\\: bool, route_params\\: array\\\\}\\> will always evaluate to true\\.$#" count: 1 path: src/Security/RolesBuilder/AdminRolesBuilder.php @@ -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\\, array\\\\|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 @@ -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 @@ -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\\, \\.\\.\\.\\}, 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\\, \\.\\.\\.\\}, 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 @@ -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\\, \\.\\.\\.\\}, 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 diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 53eb247e..d3b4b9fa 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,10 +1,37 @@ - + $username + + + getFlashBag + + + + + GroupManager|class-string<GroupInterface> + + + $class + + + $groupManager + + + + + UserManager|class-string<UserInterface> + + + $class + + + $userManager + + children @@ -41,6 +68,9 @@ string[] + + $groupData['items'] +