DX: more type hint for DirectExportInterface

This commit is contained in:
Julien Fastré 2022-10-06 23:43:16 +02:00
parent 07d15f0a68
commit 2fdb1dfb52
2 changed files with 5 additions and 11 deletions

View File

@ -11,28 +11,22 @@ declare(strict_types=1);
namespace Chill\MainBundle\Export; namespace Chill\MainBundle\Export;
use Symfony\Component\Security\Core\Role\Role; use Symfony\Component\HttpFoundation\Response;
interface DirectExportInterface extends ExportElementInterface interface DirectExportInterface extends ExportElementInterface
{ {
/** /**
* Generate the export. * 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). * get a description, which will be used in UI (and translated).
*
* @return string
*/ */
public function getDescription(); public function getDescription(): string;
/** /**
* authorized role. * authorized role.
*
* @return \Symfony\Component\Security\Core\Role\Role
*/ */
public function requiredRole(); public function requiredRole(): string;
} }

View File

@ -123,7 +123,7 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat
/** /**
* @return string * @return string
*/ */
public function getDescription() public function getDescription(): string
{ {
return 'Create a list of duplicate people'; return 'Create a list of duplicate people';
} }