Rector changes return typing

This commit is contained in:
2025-08-27 16:32:44 +02:00
parent da240f5ce5
commit 979b2955f6
93 changed files with 164 additions and 180 deletions

View File

@@ -54,7 +54,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
public function __construct(protected CustomFieldsGroup $customfieldsGroup, protected TranslatableStringHelper $translatableStringHelper, protected TranslatorInterface $translator, protected CustomFieldProvider $customFieldProvider, protected EntityManagerInterface $em) {}
public function buildForm(FormBuilderInterface $builder)
public function buildForm(FormBuilderInterface $builder): void
{
$choices = array_combine($this->fields, $this->fields);
@@ -128,7 +128,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
return [FormatterInterface::TYPE_LIST];
}
public function getDescription()
public function getDescription(): string
{
return $this->translator->trans(
"Generate list of report '%type%'",
@@ -469,7 +469,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface
*
* @return CustomField[]
*/
private function getCustomFields()
private function getCustomFields(): array
{
return array_filter($this->customfieldsGroup
->getCustomFields()->toArray(), static fn (CustomField $cf) => 'title' !== $cf->getType());

View File

@@ -67,7 +67,7 @@ final class ReportVoterTest extends KernelTestCase
$action,
$message,
?User $user = null,
) {
): void {
$token = $this->prepareToken($user);
$result = $this->voter->vote($token, $report, [$action]);
$this->assertEquals($expectedResult, $result, $message);