Ease entity registration

Remove phpstan errors and ease code.
Directly call the static methods instead of wrapping the call with
call_user_func() for no reason.
This commit is contained in:
Daniel Siepmann (Codappix) 2024-11-28 07:46:07 +01:00
parent 734d94f9da
commit 8499284d5f
SSH key fingerprint: SHA256:nAjx3Dpp8kuAC+S7QXj8BWmqw+KI1Miu+5e40BP3LXA
2 changed files with 2 additions and 12 deletions

View file

@ -47,8 +47,8 @@ class EntityPass implements CompilerPassInterface
'registerEntityClass', 'registerEntityClass',
[ [
$definition->getClass(), $definition->getClass(),
call_user_func([$definition->getClass(), 'getPriority']), $definition->getClass()::getPriority(),
call_user_func([$definition->getClass(), 'getSupportedTypes']), $definition->getClass()::getSupportedTypes(),
] ]
); );
} }

View file

@ -1,15 +1,5 @@
parameters: parameters:
ignoreErrors: ignoreErrors:
-
message: "#^Parameter \\#1 \\$callback of function call_user_func expects callable\\(\\)\\: mixed, array\\{class\\-string, 'getPriority'\\} given\\.$#"
count: 1
path: Classes/DependencyInjection/EntityPass.php
-
message: "#^Parameter \\#1 \\$callback of function call_user_func expects callable\\(\\)\\: mixed, array\\{class\\-string, 'getSupportedTypes'\\} given\\.$#"
count: 1
path: Classes/DependencyInjection/EntityPass.php
- -
message: "#^Method WerkraumMedia\\\\ThueCat\\\\Domain\\\\Import\\\\EntityMapper\\:\\:mapDataToEntity\\(\\) should return object but returns mixed\\.$#" message: "#^Method WerkraumMedia\\\\ThueCat\\\\Domain\\\\Import\\\\EntityMapper\\:\\:mapDataToEntity\\(\\) should return object but returns mixed\\.$#"
count: 1 count: 1