From 2fdb1dfb52de5a23e6c6aea0d89f79b2c08e3df5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 6 Oct 2022 23:43:16 +0200 Subject: [PATCH] DX: more type hint for DirectExportInterface --- .../Export/DirectExportInterface.php | 14 ++++---------- .../Export/Export/ListPersonDuplicate.php | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Export/DirectExportInterface.php b/src/Bundle/ChillMainBundle/Export/DirectExportInterface.php index 9e89ebaad..9703a42de 100644 --- a/src/Bundle/ChillMainBundle/Export/DirectExportInterface.php +++ b/src/Bundle/ChillMainBundle/Export/DirectExportInterface.php @@ -11,28 +11,22 @@ declare(strict_types=1); namespace Chill\MainBundle\Export; -use Symfony\Component\Security\Core\Role\Role; +use Symfony\Component\HttpFoundation\Response; interface DirectExportInterface extends ExportElementInterface { /** * Generate the export. - * - * @return \Symfony\Component\HttpFoundation\Response */ - public function generate(array $acl, array $data = []); + public function generate(array $acl, array $data = []): Response; /** * get a description, which will be used in UI (and translated). - * - * @return string */ - public function getDescription(); + public function getDescription(): string; /** * authorized role. - * - * @return \Symfony\Component\Security\Core\Role\Role */ - public function requiredRole(); + public function requiredRole(): string; } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php index bde0ec910..cf7e6608a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php @@ -123,7 +123,7 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat /** * @return string */ - public function getDescription() + public function getDescription(): string { return 'Create a list of duplicate people'; }