Skip to content

Fix broken return types in AbstractManagerRegistry #666

Fix broken return types in AbstractManagerRegistry

Fix broken return types in AbstractManagerRegistry #666

Triggered via pull request June 19, 2024 19:25
Status Failure
Total duration 37s
Artifacts

static-analysis.yml

on: pull_request
Matrix: Static Analysis / PHPStan
Matrix: Static Analysis / Psalm
Fit to window
Zoom out
Zoom in

Annotations

12 errors
Static Analysis / PHPStan (8.3): src/Persistence/AbstractManagerRegistry.php#L121
Method Doctrine\Persistence\AbstractManagerRegistry::getManager() should return Doctrine\Persistence\ObjectManager but returns object.
Static Analysis / PHPStan (8.3): src/Persistence/AbstractManagerRegistry.php#L144
Call to an undefined method object::getMetadataFactory().
Static Analysis / PHPStan (8.3): src/Persistence/AbstractManagerRegistry.php#L145
Method Doctrine\Persistence\AbstractManagerRegistry::getManagerForClass() should return Doctrine\Persistence\ObjectManager|null but returns object.
Static Analysis / PHPStan (8.3): src/Persistence/AbstractManagerRegistry.php#L172
Method Doctrine\Persistence\AbstractManagerRegistry::getManagers() should return array<string, Doctrine\Persistence\ObjectManager> but returns array<string, object>.
Static Analysis / PHPStan (8.3)
Process completed with exit code 1.
MoreSpecificReturnType: src/Persistence/AbstractManagerRegistry.php#L109
src/Persistence/AbstractManagerRegistry.php:109:59: MoreSpecificReturnType: The declared return type 'Doctrine\Persistence\ObjectManager' for Doctrine\Persistence\AbstractManagerRegistry::getManager is more specific than the inferred return type 'object' (see https://psalm.dev/070)
LessSpecificReturnStatement: src/Persistence/AbstractManagerRegistry.php#L121
src/Persistence/AbstractManagerRegistry.php:121:16: LessSpecificReturnStatement: The type 'object' is more general than the declared return type 'Doctrine\Persistence\ObjectManager' for Doctrine\Persistence\AbstractManagerRegistry::getManager (see https://psalm.dev/129)
MoreSpecificReturnType: src/Persistence/AbstractManagerRegistry.php#L124
src/Persistence/AbstractManagerRegistry.php:124:56: MoreSpecificReturnType: The declared return type 'Doctrine\Persistence\ObjectManager|null' for Doctrine\Persistence\AbstractManagerRegistry::getManagerForClass is more specific than the inferred return type 'null|object' (see https://psalm.dev/070)
LessSpecificReturnStatement: src/Persistence/AbstractManagerRegistry.php#L145
src/Persistence/AbstractManagerRegistry.php:145:24: LessSpecificReturnStatement: The type 'object' is more general than the declared return type 'Doctrine\Persistence\ObjectManager|null' for Doctrine\Persistence\AbstractManagerRegistry::getManagerForClass (see https://psalm.dev/129)
MoreSpecificReturnType: src/Persistence/AbstractManagerRegistry.php#L163
src/Persistence/AbstractManagerRegistry.php:163:36: MoreSpecificReturnType: The declared return type 'array<string, Doctrine\Persistence\ObjectManager>' for Doctrine\Persistence\AbstractManagerRegistry::getManagers is more specific than the inferred return type 'array<string, object>' (see https://psalm.dev/070)
LessSpecificReturnStatement: src/Persistence/AbstractManagerRegistry.php#L172
src/Persistence/AbstractManagerRegistry.php:172:16: LessSpecificReturnStatement: The type 'array<string, object>' is more general than the declared return type 'array<string, Doctrine\Persistence\ObjectManager>' for Doctrine\Persistence\AbstractManagerRegistry::getManagers (see https://psalm.dev/129)
Static Analysis / Psalm (8.3)
Process completed with exit code 2.