From 75f69859e6353f3fd08fc7a7f3770c8e61c51dc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 31 Oct 2022 18:00:41 +0100 Subject: [PATCH] fix psalm errors --- .../ChillMainBundle/Export/Helper/ExportAddressHelper.php | 2 +- .../ChillMainBundle/Tests/Export/ExportManagerTest.php | 6 ++++-- src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php | 2 +- .../Export/Export/ListPersonWithAccompanyingPeriod.php | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Export/Helper/ExportAddressHelper.php b/src/Bundle/ChillMainBundle/Export/Helper/ExportAddressHelper.php index 41443e3d8..268abc3ea 100644 --- a/src/Bundle/ChillMainBundle/Export/Helper/ExportAddressHelper.php +++ b/src/Bundle/ChillMainBundle/Export/Helper/ExportAddressHelper.php @@ -253,7 +253,7 @@ class ExportAddressHelper return 0; default: - throw new LogicException('this value is not supported for ' . $sanitizedKey . ': ' . $val); + throw new LogicException('this value is not supported for ' . $sanitizedKey . ': ' . $value); } }; diff --git a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php index b3f5eac85..701b3d14e 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php @@ -680,10 +680,12 @@ final class ExportManagerTest extends KernelTestCase return new ExportManager( $logger ?? self::$container->get('logger'), - $em ?? self::$container->get('doctrine.orm.entity_manager'), $authorizationChecker ?? self::$container->get('security.authorization_checker'), $authorizationHelper ?? self::$container->get('chill.main.security.authorization.helper'), - $tokenStorage + $tokenStorage, + [], + [], + [] ); } } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php index d1a23a570..549fe1c4d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php @@ -187,7 +187,7 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface, Grou } /** - * @param array{fields: string[], address_date: DateTimeImmutable} $data + * param array{fields: string[], address_date: DateTimeImmutable} $data */ public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) { diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriod.php index 534eaecc6..7ddc6c9d3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriod.php @@ -155,7 +155,7 @@ class ListPersonWithAccompanyingPeriod implements ExportElementValidatedInterfac } /** - * @param array{fields: string[], address_date: DateTimeImmutable} $data + * param array{fields: string[], address_date: DateTimeImmutable} $data */ public function initiateQuery(array $requiredModifiers, array $acl, array $data = []) {