DX: fix phpstan issues

This commit is contained in:
2023-04-12 17:48:02 +02:00
parent d04011ca07
commit 2a4b73457b
6 changed files with 10 additions and 49 deletions

View File

@@ -31,8 +31,6 @@ use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
use function count;
/**
*/
final class CalendarContext implements CalendarContextInterface
{
private BaseContextData $baseContextData;
@@ -150,10 +148,8 @@ final class CalendarContext implements CalendarContextInterface
}
/**
* param array{mainPerson?: Person, thirdParty?: ThirdParty, title: string} $contextGenerationData
* @param mixed $entity
*/
public function getData(DocGeneratorTemplate $template, $entity, array $contextGenerationData = []): array
public function getData(DocGeneratorTemplate $template, mixed $entity, array $contextGenerationData = []): array
{
$options = $this->getOptions($template);
@@ -274,9 +270,6 @@ final class CalendarContext implements CalendarContextInterface
return $denormalized;
}
/**
* param array{mainPerson?: Person, thirdParty?: ThirdParty, title: string} $contextGenerationData
*/
public function storeGenerated(DocGeneratorTemplate $template, StoredObject $storedObject, object $entity, array $contextGenerationData): void
{
$options = $this->getOptions($template);
@@ -287,9 +280,6 @@ final class CalendarContext implements CalendarContextInterface
$this->entityManager->persist($doc);
}
/**
* return array{askMainPerson: bool, mainPersonLabel: ?string, askThirdParty: bool, thirdPartyLabel: ?string, trackDateTime: bool} $options
*/
private function getOptions(DocGeneratorTemplate $template): array
{
return $template->getOptions();