From a3e166537ef6274b088df64854ff1947c2f5f02f Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Fri, 10 Dec 2021 21:21:15 +0100 Subject: [PATCH] Update phpstan (#308) * Update phpstan * Fix phpstan issues * Update with baseline --- Admin/DynamicListAdmin.php | 2 +- Admin/FormAdmin.php | 11 + Command/FormGeneratorCommand.php | 26 +- Configuration/FormConfiguration.php | 3 + Configuration/MailConfiguration.php | 22 +- Configuration/MailConfigurationInterface.php | 10 +- Content/Types/SingleFormSelection.php | 9 +- Controller/FormController.php | 2 + Controller/FormWebsiteController.php | 13 +- .../DynamicListBuilderCompilerPass.php | 2 + .../CompilerPass/ListProviderCompilerPass.php | 3 + ...moveTaggedServiceCollectorCompilerPass.php | 3 + DependencyInjection/Configuration.php | 2 + DependencyInjection/SuluFormExtension.php | 11 +- Dynamic/Types/ChoiceTrait.php | 4 +- Entity/Dynamic.php | 9 + Entity/Form.php | 8 +- Entity/FormField.php | 4 +- Entity/FormTranslation.php | 4 +- Event/DynFormSavedEvent.php | 2 +- Exception/FormNotFoundException.php | 3 + .../InvalidListBuilderValueException.php | 5 +- Form/Builder.php | 2 +- Form/Handler.php | 2 + Form/Type/AbstractType.php | 4 +- Form/Type/DynamicFormType.php | 4 + Form/Type/TypeInterface.php | 13 +- ListBuilder/DynamicListBuilder.php | 2 +- ListBuilder/DynamicListFactory.php | 4 +- Mail/MailerHelper.php | 26 +- Mail/NullHelper.php | 4 +- Media/CollectionStrategySingle.php | 10 +- Media/CollectionStrategyTree.php | 10 +- Metadata/DynamicFormMetadataLoader.php | 3 + Metadata/PropertiesXmlLoader.php | 4 + Repository/DynamicRepository.php | 3 + Repository/FormRepository.php | 7 + SuluFormBundle.php | 2 +- composer.json | 12 +- phpstan-baseline.neon | 1687 +++++++++++++++++ phpstan.neon | 9 +- 41 files changed, 1866 insertions(+), 100 deletions(-) create mode 100644 phpstan-baseline.neon diff --git a/Admin/DynamicListAdmin.php b/Admin/DynamicListAdmin.php index 86c56fa2..7bab1d0f 100644 --- a/Admin/DynamicListAdmin.php +++ b/Admin/DynamicListAdmin.php @@ -30,7 +30,7 @@ public static function getPriority(): int private $viewBuilderFactory; /** - * @var array + * @var mixed[] */ private $config; diff --git a/Admin/FormAdmin.php b/Admin/FormAdmin.php index 409b3f5b..ab1bbd87 100644 --- a/Admin/FormAdmin.php +++ b/Admin/FormAdmin.php @@ -31,8 +31,19 @@ class FormAdmin extends Admin const EDIT_FORM_VIEW = 'sulu_form.edit_form'; const EDIT_FORM_DETAILS_VIEW = 'sulu_form.edit_form.details'; + /** + * @var SecurityCheckerInterface + */ private $securityChecker; + + /** + * @var ViewBuilderFactoryInterface + */ private $viewBuilderFactory; + + /** + * @var WebspaceManagerInterface + */ private $webspaceManager; /** diff --git a/Command/FormGeneratorCommand.php b/Command/FormGeneratorCommand.php index 54b5b1c4..ebda48fe 100644 --- a/Command/FormGeneratorCommand.php +++ b/Command/FormGeneratorCommand.php @@ -43,15 +43,16 @@ public function __construct( $this->webspaceManager = $webspaceManager; } - protected function configure() + protected function configure(): void { $this->setDescription('Generates a form with all basic form types'); } - protected function execute(InputInterface $input, OutputInterface $output) + protected function execute(InputInterface $input, OutputInterface $output): int { $form = $this->loadTestForm() ?: new Form(); + /** @var non-empty-array $locales */ $locales = $this->webspaceManager->getAllLocales(); $form->setDefaultLocale(current($locales)); @@ -115,11 +116,9 @@ protected function execute(InputInterface $input, OutputInterface $output) ], [ 'type' => 'headline', - 'width' => 'full', ], [ 'type' => 'freeText', - 'width' => 'full', ], [ 'type' => 'function', @@ -148,47 +147,39 @@ protected function execute(InputInterface $input, OutputInterface $output) ], [ 'type' => 'attachment', - 'width' => 'full', ], [ 'type' => 'radioButtons', - 'width' => 'full', 'options' => [ 'choices' => $this->getChoices(), ], ], [ 'type' => 'checkboxMultiple', - 'width' => 'full', 'options' => [ 'choices' => $this->getChoices(), ], ], [ 'type' => 'dropdown', - 'width' => 'full', 'options' => [ 'choices' => $this->getChoices(), ], ], [ 'type' => 'dropdownMultiple', - 'width' => 'full', 'options' => [ 'choices' => $this->getChoices(), ], ], [ 'type' => 'checkbox', - 'width' => 'full', ], [ 'type' => 'text', - 'width' => 'full', ], [ 'type' => 'textarea', - 'width' => 'full', ], ]; @@ -226,6 +217,10 @@ protected function execute(InputInterface $input, OutputInterface $output) return 0; } + /** + * @param non-empty-array $locales + * @param mixed[] $options + */ private function addField( Form $form, array $locales, @@ -235,7 +230,7 @@ private function addField( string $width = 'full', bool $required = false, array $options = [] - ) { + ): void { $formField = $form->getField($fieldKey) ?: new FormField(); $formField->setForm($form); $formField->setDefaultLocale(current($locales)); @@ -272,7 +267,10 @@ private function loadTestForm(): ?Form } } - private function getChoices() + /** + * @return string + */ + private function getChoices(): string { return 'Choice 1' . PHP_EOL . diff --git a/Configuration/FormConfiguration.php b/Configuration/FormConfiguration.php index e910fddd..fd784347 100644 --- a/Configuration/FormConfiguration.php +++ b/Configuration/FormConfiguration.php @@ -130,6 +130,9 @@ public function getFileSave(): bool return $this->fileSave; } + /** + * @return $this + */ public function setFileSave(bool $fileSave) { $this->fileSave = $fileSave; diff --git a/Configuration/MailConfiguration.php b/Configuration/MailConfiguration.php index 03668909..236011f6 100644 --- a/Configuration/MailConfiguration.php +++ b/Configuration/MailConfiguration.php @@ -27,27 +27,27 @@ class MailConfiguration implements MailConfigurationInterface private $subject; /** - * @var string|array + * @var string|string[] */ private $from; /** - * @var string|array + * @var string|string[] */ private $to = []; /** - * @var string|array + * @var string|string[] */ private $cc = []; /** - * @var string|array + * @var string|string[] */ private $bcc = []; /** - * @var string|array + * @var string|string[] */ private $replyTo; @@ -67,7 +67,7 @@ class MailConfiguration implements MailConfigurationInterface private $plainTextTemplate; /** - * @var array + * @var mixed[] */ private $templateAttributes; @@ -110,7 +110,7 @@ public function getFrom() /** * Set from address. * - * @param string|array $from + * @param string|string[] $from */ public function setFrom($from): self { @@ -130,7 +130,7 @@ public function getTo() /** * Set to addresses. * - * @param string|array $to + * @param string|string[] $to */ public function setTo($to): self { @@ -150,7 +150,7 @@ public function getCc() /** * Set cc addresses. * - * @param string|array $cc + * @param string|string[] $cc */ public function setCc($cc): self { @@ -170,7 +170,7 @@ public function getBcc() /** * Set bcc addresses. * - * @param string|array $bcc + * @param string|string[] $bcc */ public function setBcc($bcc): self { @@ -190,7 +190,7 @@ public function getReplyTo() /** * Set reply to. * - * @param string|array $replyTo + * @param string|string[] $replyTo */ public function setReplyTo($replyTo): self { diff --git a/Configuration/MailConfigurationInterface.php b/Configuration/MailConfigurationInterface.php index 458a280a..b4af49c4 100644 --- a/Configuration/MailConfigurationInterface.php +++ b/Configuration/MailConfigurationInterface.php @@ -27,35 +27,35 @@ public function getSubject(): ?string; /** * Get from address. * - * @return string|array + * @return string|string[] */ public function getFrom(); /** * Get to addresses. * - * @return string|array + * @return string|string[] */ public function getTo(); /** * Get cc addresses. * - * @return string|array + * @return string|string[] */ public function getCc(); /** * Get bcc addresses. * - * @return string|array + * @return string|string[] */ public function getBcc(); /** * Get reply to. * - * @return string|array + * @return string|string[] */ public function getReplyTo(); diff --git a/Content/Types/SingleFormSelection.php b/Content/Types/SingleFormSelection.php index eab4a48c..8f7299c0 100644 --- a/Content/Types/SingleFormSelection.php +++ b/Content/Types/SingleFormSelection.php @@ -19,6 +19,7 @@ use Sulu\Component\Content\Compat\Structure\StructureBridge; use Sulu\Component\Content\SimpleContentType; use Symfony\Component\Form\FormInterface; +use Symfony\Component\Form\FormView; use Symfony\Component\Validator\Exception\MissingOptionsException; /** @@ -54,13 +55,15 @@ public function __construct( /** * {@inheritdoc} + * + * @return FormView|null */ public function getContentData(PropertyInterface $property) { $id = (int) $property->getValue(); if (!$id) { - return; + return null; } if (!isset($property->getParams()['resourceKey'])) { @@ -85,7 +88,7 @@ public function getContentData(PropertyInterface $property) $form = $this->loadShadowForm($property, $id, $resourceKey); if (!$form) { - return; + return null; } } @@ -117,6 +120,8 @@ private function loadShadowForm(PropertyInterface $property, int $id, string $ty /** * {@inheritdoc} + * + * @return mixed[] */ public function getViewData(PropertyInterface $property) { diff --git a/Controller/FormController.php b/Controller/FormController.php index 8f69d845..ff8fa333 100644 --- a/Controller/FormController.php +++ b/Controller/FormController.php @@ -74,6 +74,8 @@ public function __construct( /** * {@inheritdoc} + * + * @return string */ public function getSecurityContext() { diff --git a/Controller/FormWebsiteController.php b/Controller/FormWebsiteController.php index f558d495..a87f3e5e 100644 --- a/Controller/FormWebsiteController.php +++ b/Controller/FormWebsiteController.php @@ -32,12 +32,12 @@ class FormWebsiteController extends DefaultController { /** - * @var FormInterface + * @var FormInterface|null */ protected $form; /** - * @var array + * @var mixed[] */ protected $attributes; @@ -185,7 +185,7 @@ private function handleFormOnlySubmit(Request $request, AbstractType $type): ?Re /** * Get errors. * - * @return array[] + * @return array */ protected function getErrors(): array { @@ -217,6 +217,11 @@ protected function getErrors(): array /** * {@inheritdoc} + * + * @param mixed[] $attributes + * @param bool $preview + * + * @return mixed[] */ protected function getAttributes($attributes, StructureInterface $structure = null, $preview = false) { @@ -224,7 +229,7 @@ protected function getAttributes($attributes, StructureInterface $structure = nu $this->attributes = parent::getAttributes($attributes, $structure, $preview); } - if (!empty($this->form)) { + if ($this->form) { $this->attributes['form'] = $this->form->createView(); } diff --git a/DependencyInjection/CompilerPass/DynamicListBuilderCompilerPass.php b/DependencyInjection/CompilerPass/DynamicListBuilderCompilerPass.php index 85a9559d..2587aa5d 100644 --- a/DependencyInjection/CompilerPass/DynamicListBuilderCompilerPass.php +++ b/DependencyInjection/CompilerPass/DynamicListBuilderCompilerPass.php @@ -17,6 +17,8 @@ /** * Add all available dynamic list builders to the factory. + * + * @internal */ class DynamicListBuilderCompilerPass implements CompilerPassInterface { diff --git a/DependencyInjection/CompilerPass/ListProviderCompilerPass.php b/DependencyInjection/CompilerPass/ListProviderCompilerPass.php index 0717ec07..f1cafb9c 100644 --- a/DependencyInjection/CompilerPass/ListProviderCompilerPass.php +++ b/DependencyInjection/CompilerPass/ListProviderCompilerPass.php @@ -15,6 +15,9 @@ use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Reference; +/** + * @internal + */ class ListProviderCompilerPass implements CompilerPassInterface { /** diff --git a/DependencyInjection/CompilerPass/RemoveTaggedServiceCollectorCompilerPass.php b/DependencyInjection/CompilerPass/RemoveTaggedServiceCollectorCompilerPass.php index 2fda1181..230c5162 100644 --- a/DependencyInjection/CompilerPass/RemoveTaggedServiceCollectorCompilerPass.php +++ b/DependencyInjection/CompilerPass/RemoveTaggedServiceCollectorCompilerPass.php @@ -14,6 +14,9 @@ use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; use Symfony\Component\DependencyInjection\ContainerBuilder; +/** + * @internal + */ class RemoveTaggedServiceCollectorCompilerPass implements CompilerPassInterface { /** diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index ba271220..dcbb82e6 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -19,6 +19,8 @@ * This is the class that validates and merges configuration from your app/config files. * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} + * + * @internal */ class Configuration implements ConfigurationInterface { diff --git a/DependencyInjection/SuluFormExtension.php b/DependencyInjection/SuluFormExtension.php index 32e287b5..04567a00 100644 --- a/DependencyInjection/SuluFormExtension.php +++ b/DependencyInjection/SuluFormExtension.php @@ -25,6 +25,8 @@ * This is the class that loads and manages your bundle configuration. * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} + * + * @internal */ class SuluFormExtension extends Extension implements PrependExtensionInterface { @@ -35,7 +37,7 @@ class SuluFormExtension extends Extension implements PrependExtensionInterface /** * {@inheritdoc} */ - public function prepend(ContainerBuilder $container) + public function prepend(ContainerBuilder $container): void { if ($container->hasExtension('fos_js_routing')) { $container->prependExtensionConfig( @@ -129,7 +131,7 @@ public function prepend(ContainerBuilder $container) /** * {@inheritdoc} */ - public function load(array $configs, ContainerBuilder $container) + public function load(array $configs, ContainerBuilder $container): void { $configuration = new Configuration(); $config = $this->processConfiguration($configuration, $configs); @@ -220,7 +222,10 @@ public function load(array $configs, ContainerBuilder $container) $this->configureHelper($loader, $config, $container); } - private function configureHelper(Loader\XmlFileLoader $loader, array $config, ContainerBuilder $container) + /** + * @param mixed[] $config + */ + private function configureHelper(Loader\XmlFileLoader $loader, array $config, ContainerBuilder $container): void { $helper = $config['mail']['helper']; if (\method_exists($container, 'resolveEnvPlaceholders')) { diff --git a/Dynamic/Types/ChoiceTrait.php b/Dynamic/Types/ChoiceTrait.php index 88d74cfe..91b3eaf1 100644 --- a/Dynamic/Types/ChoiceTrait.php +++ b/Dynamic/Types/ChoiceTrait.php @@ -31,9 +31,9 @@ protected function getChoices(FormFieldTranslation $translation): array /** * Returns options for multichoice form type like select, multiple select, radio or checkboxes. * - * @param string[] $options + * @param mixed[] $options * - * @return string[] + * @return mixed[] */ private function getChoiceOptions( FormFieldTranslation $translation, diff --git a/Entity/Dynamic.php b/Entity/Dynamic.php index 1e017f60..bb38ae87 100644 --- a/Entity/Dynamic.php +++ b/Entity/Dynamic.php @@ -21,12 +21,18 @@ class Dynamic implements AuditableInterface const TYPE_ATTACHMENT = 'attachment'; const TYPE_EMAIL = 'email'; + /** + * @var string[] + */ protected static $ARRAY_TYPES = [ 'checkboxMultiple', 'dropdownMultiple', self::TYPE_ATTACHMENT, ]; + /** + * @var string[] + */ public static $HIDDEN_TYPES = [ 'spacer', 'headline', @@ -99,6 +105,9 @@ public function getData(): array return json_decode($this->data ?: '[]', true); } + /** + * @param mixed[] $data + */ public function setData(array $data): self { $this->data = json_encode($data, JSON_UNESCAPED_UNICODE); diff --git a/Entity/Form.php b/Entity/Form.php index e67616dc..152e3118 100644 --- a/Entity/Form.php +++ b/Entity/Form.php @@ -30,12 +30,12 @@ class Form private $defaultLocale; /** - * @var Collection|FormTranslation[] + * @var Collection */ private $translations; /** - * @var Collection|FormField[] + * @var Collection */ private $fields; @@ -79,7 +79,7 @@ public function removeTranslation(FormTranslation $translation): self /** * Get translations. * - * @return Collection|FormTranslation[] + * @return Collection */ public function getTranslations() { @@ -124,7 +124,7 @@ public function removeField(FormField $field): self } /** - * @return Collection|FormField[] + * @return Collection */ public function getFields() { diff --git a/Entity/FormField.php b/Entity/FormField.php index 9e09afb3..a180dbc1 100644 --- a/Entity/FormField.php +++ b/Entity/FormField.php @@ -55,7 +55,7 @@ class FormField private $defaultLocale; /** - * @var Collection|FormFieldTranslation[] + * @var Collection */ private $translations; @@ -189,7 +189,7 @@ public function removeTranslation(FormFieldTranslation $translation): void } /** - * @return Collection|FormFieldTranslation[] + * @return Collection */ public function getTranslations() { diff --git a/Entity/FormTranslation.php b/Entity/FormTranslation.php index e63f4863..439cc628 100644 --- a/Entity/FormTranslation.php +++ b/Entity/FormTranslation.php @@ -109,7 +109,7 @@ class FormTranslation implements AuditableInterface private $form; /** - * @var Collection|FormTranslationReceiver[] + * @var Collection */ private $receivers; @@ -316,7 +316,7 @@ public function getForm(): Form } /** - * @return FormTranslationReceiver[]|Collection + * @return Collection */ public function getReceivers() { diff --git a/Event/DynFormSavedEvent.php b/Event/DynFormSavedEvent.php index 25150686..37b0695c 100644 --- a/Event/DynFormSavedEvent.php +++ b/Event/DynFormSavedEvent.php @@ -22,7 +22,7 @@ class DynFormSavedEvent extends Event const NAME = 'sulu.dynform.saved'; /** - * @var array + * @var mixed[] */ protected $data; diff --git a/Exception/FormNotFoundException.php b/Exception/FormNotFoundException.php index 1f124efe..fcc85444 100644 --- a/Exception/FormNotFoundException.php +++ b/Exception/FormNotFoundException.php @@ -18,6 +18,9 @@ class FormNotFoundException extends \Exception */ private $formEntityId; + /** + * @param string $locale + */ public function __construct(int $formEntityId, $locale) { parent::__construct(sprintf('The form with the ID "%s" does not exist for the locale "%s"!', $formEntityId, $locale)); diff --git a/Exception/InvalidListBuilderValueException.php b/Exception/InvalidListBuilderValueException.php index 610c9b73..fffc756a 100644 --- a/Exception/InvalidListBuilderValueException.php +++ b/Exception/InvalidListBuilderValueException.php @@ -14,10 +14,13 @@ class InvalidListBuilderValueException extends \Exception { /** - * @var mixed + * @var string */ private $value; + /** + * @param string $value + */ public function __construct($value) { parent::__construct(sprintf('Invalid value ("%s") for list builder.', $value)); diff --git a/Form/Builder.php b/Form/Builder.php index 3eebed95..996dac70 100644 --- a/Form/Builder.php +++ b/Form/Builder.php @@ -32,7 +32,7 @@ class Builder implements BuilderInterface { /** - * @var array + * @var FormInterface[] */ private $cache = []; diff --git a/Form/Handler.php b/Form/Handler.php index 945f2284..507e73f4 100644 --- a/Form/Handler.php +++ b/Form/Handler.php @@ -165,6 +165,8 @@ private function sendMails(FormInterface $form, FormConfigurationInterface $conf * Send mail. * * @param \SplFileInfo[] $attachments + * + * @return void */ private function sendMail( FormInterface $form, diff --git a/Form/Type/AbstractType.php b/Form/Type/AbstractType.php index 035cd9e7..c0ecab17 100644 --- a/Form/Type/AbstractType.php +++ b/Form/Type/AbstractType.php @@ -36,7 +36,7 @@ abstract class AbstractType extends SymfonyAbstractType implements TypeInterface protected $csrfFieldName = '_token'; /** - * @var array + * @var mixed[] */ protected $attributes = []; @@ -50,6 +50,8 @@ public function setAttributes(array $attributes): void /** * {@inheritdoc} + * + * @return void */ public function configureOptions(OptionsResolver $resolver) { diff --git a/Form/Type/DynamicFormType.php b/Form/Type/DynamicFormType.php index 201ba101..d0f15cfa 100644 --- a/Form/Type/DynamicFormType.php +++ b/Form/Type/DynamicFormType.php @@ -56,6 +56,8 @@ public function __construct( /** * {@inheritdoc} + * + * @return void */ public function buildForm(FormBuilderInterface $builder, array $options) { @@ -185,6 +187,8 @@ public function buildForm(FormBuilderInterface $builder, array $options) /** * {@inheritdoc} + * + * @return void */ public function configureOptions(OptionsResolver $resolver) { diff --git a/Form/Type/TypeInterface.php b/Form/Type/TypeInterface.php index 945bf177..4f750117 100644 --- a/Form/Type/TypeInterface.php +++ b/Form/Type/TypeInterface.php @@ -19,22 +19,22 @@ interface TypeInterface public function setAttributes(array $attributes): void; /** - * @param mixed $formData + * @param mixed[] $formData */ public function getCustomerSubject($formData = []): ?string; /** - * @param mixed $formData + * @param mixed[] $formData */ public function getNotifySubject($formData = []): ?string; /** - * @param mixed $formData + * @param mixed[] $formData */ public function getCustomerMail($formData = []): string; /** - * @param mixed $formData + * @param mixed[] $formData */ public function getNotifyMail($formData = []): string; @@ -43,10 +43,13 @@ public function getNotifyMail($formData = []): string; */ public function getCustomerPlainMail($formData = []): ?string; + /** + * @param mixed $formData + */ public function getNotifyPlainMail($formData = []): ?string; /** - * @param mixed[] $formData + * @param mixed $formData */ public function getCustomerFromMailAddress($formData = []): string; diff --git a/ListBuilder/DynamicListBuilder.php b/ListBuilder/DynamicListBuilder.php index af8a3675..1abb1213 100644 --- a/ListBuilder/DynamicListBuilder.php +++ b/ListBuilder/DynamicListBuilder.php @@ -89,7 +89,7 @@ private function toString($value): string } if (!is_array($value)) { - throw new InvalidListBuilderValueException($value); + throw new InvalidListBuilderValueException(json_encode($value)); } return implode($this->delimiter, $value); diff --git a/ListBuilder/DynamicListFactory.php b/ListBuilder/DynamicListFactory.php index e8e723b3..45c12f2e 100644 --- a/ListBuilder/DynamicListFactory.php +++ b/ListBuilder/DynamicListFactory.php @@ -28,7 +28,7 @@ class DynamicListFactory implements DynamicListFactoryInterface protected $defaultBuilder; /** - * @var array + * @var array */ protected $builders; @@ -115,7 +115,7 @@ protected function getBuilder(?string $alias = null): DynamicListBuilderInterfac $alias = $this->defaultBuilder; } - if (!$this->builders[$alias]) { + if (!isset($this->builders[$alias])) { throw new BuilderNotFoundException($alias); } diff --git a/Mail/MailerHelper.php b/Mail/MailerHelper.php index 7b8751be..42752d75 100644 --- a/Mail/MailerHelper.php +++ b/Mail/MailerHelper.php @@ -78,9 +78,9 @@ public function sendMail( $this->setHeaders( $message, - $subject ?? '', - $this->parseToAddresses($fromMail ?? $this->fromMail), - $this->parseToAddresses($toMail ?? $this->toMail), + $subject ?: '', + $this->parseToAddresses($fromMail ?: $this->fromMail), + $this->parseToAddresses($toMail ?: $this->toMail), $this->parseToAddresses($replyTo), $this->parseToAddresses($ccMail), $this->parseToAddresses($bccMail), @@ -90,10 +90,10 @@ public function sendMail( $this->setAttachments($message, $attachments); $this->logMessage( - $fromMail ?? $this->fromMail, - $toMail ?? $this->toMail, + $fromMail ?: $this->fromMail, + $toMail ?: $this->toMail, $replyTo, - $subject ?? '', + $subject ?: '', $ccMail, $bccMail, $plainText @@ -190,9 +190,11 @@ private function setBody( } /** - * @param string|array $fromMail - * @param string|array $toMail - * @param string|array $replyTo + * @param string|array $fromMail + * @param string|array $toMail + * @param string|array $replyTo + * @param array $ccMail + * @param array $bccMail * @param string $plainText */ private function logMessage( @@ -213,8 +215,8 @@ private function logMessage( ' CC: %s' . PHP_EOL . ' BCC: %s' . PHP_EOL . ' Plain text: %s' . PHP_EOL, - is_string($fromMail) ? $fromMail ?? $this->fromMail : serialize($fromMail), - is_string($toMail) ? $toMail ?? $this->toMail : serialize($toMail), + is_string($fromMail) ? $fromMail ?: $this->fromMail : serialize($fromMail), + is_string($toMail) ? $toMail ?: $this->toMail : serialize($toMail), is_string($replyTo) ? $replyTo : serialize($replyTo), $subject, serialize($ccMail), @@ -224,7 +226,7 @@ private function logMessage( } /** - * @param string|array $fromMail email address or [email-address => name] for muliple named addresses + * @param string|array $fromMail email address or [email-address => name] for muliple named addresses * * @return Address[] */ diff --git a/Mail/NullHelper.php b/Mail/NullHelper.php index dd1674b0..0d7c0f4d 100644 --- a/Mail/NullHelper.php +++ b/Mail/NullHelper.php @@ -42,9 +42,9 @@ public function sendMail( $body, $toMail = null, $fromMail = null, - $html = true, + bool $html = true, $replyTo = null, - $attachments = [], + array $attachments = [], $ccMail = [], $bccMail = [], $plainText = null diff --git a/Media/CollectionStrategySingle.php b/Media/CollectionStrategySingle.php index b1efd9c6..fe8b7aed 100644 --- a/Media/CollectionStrategySingle.php +++ b/Media/CollectionStrategySingle.php @@ -37,11 +37,11 @@ public function __construct( * {@inheritdoc} */ public function getCollectionId( - $formId, - $formTitle, - $type, - $typeId, - $locale + int $formId, + string $formTitle, + string $type, + string $typeId, + string $locale ): int { return $this->systemCollectionManager->getSystemCollection( SuluFormExtension::SYSTEM_COLLECTION_ROOT . '.attachments' diff --git a/Media/CollectionStrategyTree.php b/Media/CollectionStrategyTree.php index 4aeb08fe..c6d6517d 100644 --- a/Media/CollectionStrategyTree.php +++ b/Media/CollectionStrategyTree.php @@ -54,11 +54,11 @@ public function __construct( * {@inheritdoc} */ public function getCollectionId( - $formId, - $formTitle, - $type, - $typeId, - $locale + int $formId, + string $formTitle, + string $type, + string $typeId, + string $locale ): int { $title = $this->titleProviderPool->get($type)->getTitle($typeId, $locale); $rootCollectionKey = SuluFormExtension::SYSTEM_COLLECTION_ROOT; diff --git a/Metadata/DynamicFormMetadataLoader.php b/Metadata/DynamicFormMetadataLoader.php index 949b7f41..9badd41d 100644 --- a/Metadata/DynamicFormMetadataLoader.php +++ b/Metadata/DynamicFormMetadataLoader.php @@ -81,6 +81,9 @@ public function __construct( $this->debug = $debug; } + /** + * @param string $cacheDir + */ public function warmUp($cacheDir) { $resource = __DIR__ . '/../Resources/config/forms/form_details.xml'; diff --git a/Metadata/PropertiesXmlLoader.php b/Metadata/PropertiesXmlLoader.php index dcb0ccb5..7b47edfa 100644 --- a/Metadata/PropertiesXmlLoader.php +++ b/Metadata/PropertiesXmlLoader.php @@ -36,6 +36,10 @@ public function __construct( ); } + /** + * @param string $resource + * @param string $type + */ protected function parse($resource, \DOMXPath $xpath, $type): PropertiesMetadata { $tags = []; diff --git a/Repository/DynamicRepository.php b/Repository/DynamicRepository.php index 7bb3c2a5..36dc8f6b 100644 --- a/Repository/DynamicRepository.php +++ b/Repository/DynamicRepository.php @@ -13,9 +13,12 @@ use Doctrine\ORM\EntityRepository; use Doctrine\ORM\QueryBuilder; +use Sulu\Bundle\FormBundle\Entity\Dynamic; /** * Repository for the dynamic entity. + * + * @template-extends EntityRepository */ class DynamicRepository extends EntityRepository { diff --git a/Repository/FormRepository.php b/Repository/FormRepository.php index 37e0095d..8215e0b1 100644 --- a/Repository/FormRepository.php +++ b/Repository/FormRepository.php @@ -15,6 +15,10 @@ use Doctrine\ORM\NoResultException; use Sulu\Bundle\FormBundle\Entity\Form; +/** + * + * @template-extends EntityRepository
+ */ class FormRepository extends EntityRepository { public function loadById(int $id, ?string $locale = null): ?Form @@ -59,6 +63,9 @@ public function loadAll(?string $locale = null, array $filters = []): array return $query->getResult(); } + /** + * @param mixed[] $filters + */ public function countByFilters(string $locale = null, array $filters = []): int { $queryBuilder = $this->createQueryBuilder('form'); diff --git a/SuluFormBundle.php b/SuluFormBundle.php index a1ba6125..4380c677 100644 --- a/SuluFormBundle.php +++ b/SuluFormBundle.php @@ -20,7 +20,7 @@ class SuluFormBundle extends Bundle { - public function build(ContainerBuilder $container) + public function build(ContainerBuilder $container): void { parent::build($container); diff --git a/composer.json b/composer.json index c27159cd..aec65ff7 100644 --- a/composer.json +++ b/composer.json @@ -51,12 +51,12 @@ "symfony/monolog-bundle": "^3.1", "symfony/stopwatch": "^4.4 || ^5.0", "symfony/var-dumper": "^4.4 || ^5.0", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-doctrine": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-symfony": "^0.12", - "thecodingmachine/phpstan-strict-rules": "^0.12", - "jangregor/phpstan-prophecy": "^0.8" + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-doctrine": "^1.0", + "phpstan/phpstan-phpunit": "^1.0", + "phpstan/phpstan-symfony": "^1.0", + "thecodingmachine/phpstan-strict-rules": "^1.0", + "jangregor/phpstan-prophecy": "^1.0" }, "replace": { "sulu/sulu-form-bundle": "self.version" diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon new file mode 100644 index 00000000..27f7d87f --- /dev/null +++ b/phpstan-baseline.neon @@ -0,0 +1,1687 @@ +parameters: + ignoreErrors: + - + message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" + count: 1 + path: Admin/DynamicListAdmin.php + + - + message: "#^Cannot access offset 'name' on mixed\\.$#" + count: 2 + path: Admin/DynamicListAdmin.php + + - + message: "#^Cannot access offset 'position' on mixed\\.$#" + count: 2 + path: Admin/DynamicListAdmin.php + + - + message: "#^Cannot access offset 'property' on mixed\\.$#" + count: 2 + path: Admin/DynamicListAdmin.php + + - + message: "#^Cannot access offset 'template' on mixed\\.$#" + count: 2 + path: Admin/DynamicListAdmin.php + + - + message: "#^Cannot access offset 'type' on mixed\\.$#" + count: 1 + path: Admin/DynamicListAdmin.php + + - + message: "#^Cannot access offset 'view' on mixed\\.$#" + count: 2 + path: Admin/DynamicListAdmin.php + + - + message: "#^Parameter \\#1 \\$name of method Sulu\\\\Bundle\\\\AdminBundle\\\\Admin\\\\View\\\\ViewBuilderFactoryInterface\\:\\:createListViewBuilder\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Admin/DynamicListAdmin.php + + - + message: "#^Parameter \\#1 \\$tabOrder of method Sulu\\\\Bundle\\\\AdminBundle\\\\Admin\\\\View\\\\ListViewBuilderInterface\\:\\:setTabOrder\\(\\) expects int, mixed given\\.$#" + count: 1 + path: Admin/DynamicListAdmin.php + + - + message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" + count: 1 + path: Admin/DynamicListAdmin.php + + - + message: "#^Cannot call method setForm\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Command/FormGeneratorCommand.php + + - + message: "#^Cannot call method setLocale\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Command/FormGeneratorCommand.php + + - + message: "#^Cannot call method setOptions\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Command/FormGeneratorCommand.php + + - + message: "#^Cannot call method setTitle\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Command/FormGeneratorCommand.php + + - + message: "#^Cannot call method setTitle\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Command/FormGeneratorCommand.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Command\\\\FormGeneratorCommand\\:\\:loadTestForm\\(\\) should return Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Form\\|null but returns mixed\\.$#" + count: 1 + path: Command/FormGeneratorCommand.php + + - + message: "#^Property Sulu\\\\Bundle\\\\FormBundle\\\\Configuration\\\\FormConfiguration\\:\\:\\$adminMailConfiguration \\(Sulu\\\\Bundle\\\\FormBundle\\\\Configuration\\\\MailConfigurationInterface\\) does not accept Sulu\\\\Bundle\\\\FormBundle\\\\Configuration\\\\MailConfigurationInterface\\|null\\.$#" + count: 1 + path: Configuration/FormConfiguration.php + + - + message: "#^Property Sulu\\\\Bundle\\\\FormBundle\\\\Configuration\\\\FormConfiguration\\:\\:\\$websiteMailConfiguration \\(Sulu\\\\Bundle\\\\FormBundle\\\\Configuration\\\\MailConfigurationInterface\\) does not accept Sulu\\\\Bundle\\\\FormBundle\\\\Configuration\\\\MailConfigurationInterface\\|null\\.$#" + count: 1 + path: Configuration/FormConfiguration.php + + - + message: "#^Cannot call method getDeactivateAttachmentSave\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Cannot call method getDeactivateCustomerMails\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Cannot call method getDeactivateNotifyMails\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Cannot call method getFromEmail\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 2 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Cannot call method getFromName\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 2 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Cannot call method getReceivers\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Cannot call method getReplyTo\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Cannot call method getSendAttachments\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 2 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Cannot call method getSubject\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 2 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Cannot call method getTitle\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Cannot call method getToEmail\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Cannot call method getToName\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Parameter \\#1 \\$email of method Sulu\\\\Bundle\\\\FormBundle\\\\Configuration\\\\FormConfigurationFactory\\:\\:getEmail\\(\\) expects string\\|null, mixed given\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Parameter \\#1 \\$fileFields of method Sulu\\\\Bundle\\\\FormBundle\\\\Configuration\\\\FormConfiguration\\:\\:setFileFields\\(\\) expects array\\, array\\ given\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Parameter \\#1 \\$formData of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getCustomerMail\\(\\) expects array, mixed given\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Parameter \\#1 \\$formData of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getCustomerSubject\\(\\) expects array, mixed given\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Parameter \\#1 \\$formData of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getNotifyMail\\(\\) expects array, mixed given\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Parameter \\#1 \\$formData of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getNotifySubject\\(\\) expects array, mixed given\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Parameter \\#1 \\$formId of method Sulu\\\\Bundle\\\\FormBundle\\\\Media\\\\CollectionStrategyInterface\\:\\:getCollectionId\\(\\) expects int, int\\|null given\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Parameter \\#1 \\$from of method Sulu\\\\Bundle\\\\FormBundle\\\\Configuration\\\\MailConfiguration\\:\\:setFrom\\(\\) expects array\\\\|string, array\\\\|null given\\.$#" + count: 2 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Parameter \\#1 \\$replyTo of method Sulu\\\\Bundle\\\\FormBundle\\\\Configuration\\\\MailConfiguration\\:\\:setReplyTo\\(\\) expects array\\\\|string, array\\\\|null given\\.$#" + count: 1 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Parameter \\#2 \\.\\.\\.\\$arrays of function array_merge expects array, array\\\\|null given\\.$#" + count: 3 + path: Configuration/FormConfigurationFactory.php + + - + message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" + count: 1 + path: Controller/DynamicController.php + + - + message: "#^Cannot call method getFieldsByType\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\|null\\.$#" + count: 1 + path: Controller/DynamicController.php + + - + message: "#^Cannot cast mixed to int\\.$#" + count: 1 + path: Controller/DynamicController.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Controller\\\\DynamicController\\:\\:getLocale\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Controller/DynamicController.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Controller\\\\DynamicController\\:\\:loadForm\\(\\) should return Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Form but returns Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Form\\|null\\.$#" + count: 1 + path: Controller/DynamicController.php + + - + message: "#^Parameter \\#1 \\$dynamics of method Sulu\\\\Bundle\\\\FormBundle\\\\ListBuilder\\\\DynamicListFactory\\:\\:build\\(\\) expects array\\, array given\\.$#" + count: 1 + path: Controller/DynamicController.php + + - + message: "#^Parameter \\#1 \\$entity of method Doctrine\\\\ORM\\\\EntityManager\\:\\:remove\\(\\) expects object, Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\|null given\\.$#" + count: 1 + path: Controller/DynamicController.php + + - + message: "#^Parameter \\#1 \\$id of method Sulu\\\\Bundle\\\\MediaBundle\\\\Media\\\\Manager\\\\MediaManagerInterface\\:\\:delete\\(\\) expects int, mixed given\\.$#" + count: 1 + path: Controller/DynamicController.php + + - + message: "#^Parameter \\#2 \\$locale of method Sulu\\\\Bundle\\\\FormBundle\\\\ListBuilder\\\\DynamicListFactory\\:\\:build\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Controller/DynamicController.php + + - + message: "#^Parameter \\#2 \\$sort of method Sulu\\\\Bundle\\\\FormBundle\\\\Repository\\\\DynamicRepository\\:\\:findByFilters\\(\\) expects array\\, array\\ given\\.$#" + count: 1 + path: Controller/DynamicController.php + + - + message: "#^Parameter \\#2 \\$string of function explode expects string, mixed given\\.$#" + count: 1 + path: Controller/DynamicController.php + + - + message: "#^Parameter \\#3 \\$limit of method Sulu\\\\Bundle\\\\FormBundle\\\\Repository\\\\DynamicRepository\\:\\:findByFilters\\(\\) expects int\\|null, mixed given\\.$#" + count: 1 + path: Controller/DynamicController.php + + - + message: "#^Parameter \\#3 \\$route of class Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\ListRepresentation constructor expects string, mixed given\\.$#" + count: 1 + path: Controller/DynamicController.php + + - + message: "#^Parameter \\#5 \\$page of class Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\ListRepresentation constructor expects int, mixed given\\.$#" + count: 1 + path: Controller/DynamicController.php + + - + message: "#^Parameter \\#6 \\$limit of class Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\ListRepresentation constructor expects int, mixed given\\.$#" + count: 1 + path: Controller/DynamicController.php + + - + message: "#^Argument of an invalid type array\\\\|null supplied for foreach, only iterables are supported\\.$#" + count: 1 + path: Controller/FormController.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Controller\\\\FormController\\:\\:getLimit\\(\\) should return int but returns mixed\\.$#" + count: 1 + path: Controller/FormController.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Controller\\\\FormController\\:\\:getLocale\\(\\) should return string but returns mixed\\.$#" + count: 1 + path: Controller/FormController.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Controller\\\\FormController\\:\\:getOffset\\(\\) should return int but returns mixed\\.$#" + count: 1 + path: Controller/FormController.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Controller\\\\FormController\\:\\:getPage\\(\\) should return int but returns mixed\\.$#" + count: 1 + path: Controller/FormController.php + + - + message: "#^Parameter \\#1 \\$entity of method Sulu\\\\Bundle\\\\FormBundle\\\\Controller\\\\FormController\\:\\:getApiEntity\\(\\) expects Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Form, Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Form\\|null given\\.$#" + count: 1 + path: Controller/FormController.php + + - + message: "#^Parameter \\#2 \\$fieldDescriptors of method Sulu\\\\Component\\\\Rest\\\\RestHelperInterface\\:\\:initializeListBuilder\\(\\) expects array\\, array\\\\|null given\\.$#" + count: 1 + path: Controller/FormController.php + + - + message: "#^Parameter \\#3 \\$route of class Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\ListRepresentation constructor expects string, mixed given\\.$#" + count: 1 + path: Controller/FormController.php + + - + message: "#^Parameter \\#1 \\$tokenId of method Symfony\\\\Component\\\\Security\\\\Csrf\\\\CsrfTokenManagerInterface\\:\\:getToken\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Controller/FormTokenController.php + + - + message: "#^Parameter \\#2 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" + count: 1 + path: Controller/FormTokenController.php + + - + message: "#^Parameter \\#3 \\.\\.\\.\\$values of function sprintf expects bool\\|float\\|int\\|string\\|null, mixed given\\.$#" + count: 1 + path: Controller/FormTokenController.php + + - + message: "#^Call to an undefined method Symfony\\\\Component\\\\Form\\\\FormError\\|Symfony\\\\Component\\\\Form\\\\FormErrorIterator\\:\\:getMessage\\(\\)\\.$#" + count: 2 + path: Controller/FormWebsiteController.php + + - + message: "#^Cannot call method all\\(\\) on Symfony\\\\Component\\\\Form\\\\FormInterface\\|null\\.$#" + count: 1 + path: Controller/FormWebsiteController.php + + - + message: "#^Cannot call method getData\\(\\) on Symfony\\\\Component\\\\Form\\\\FormInterface\\|null\\.$#" + count: 2 + path: Controller/FormWebsiteController.php + + - + message: "#^Cannot call method getErrors\\(\\) on Symfony\\\\Component\\\\Form\\\\FormInterface\\|null\\.$#" + count: 1 + path: Controller/FormWebsiteController.php + + - + message: "#^Parameter \\#1 \\$form of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Handler\\:\\:handle\\(\\) expects Symfony\\\\Component\\\\Form\\\\FormInterface, Symfony\\\\Component\\\\Form\\\\FormInterface\\|null given\\.$#" + count: 2 + path: Controller/FormWebsiteController.php + + - + message: "#^Parameter \\#1 \\$template of method Sulu\\\\Bundle\\\\FormBundle\\\\Provider\\\\ListProviderRegistry\\:\\:getEntityName\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Controller/ListController.php + + - + message: "#^Parameter \\#1 \\$template of method Sulu\\\\Bundle\\\\FormBundle\\\\Provider\\\\ListProviderRegistry\\:\\:getFieldDescriptors\\(\\) expects string, mixed given\\.$#" + count: 2 + path: Controller/ListController.php + + - + message: "#^Parameter \\#2 \\$value of method Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\ListBuilderInterface\\:\\:where\\(\\) expects string, mixed given\\.$#" + count: 3 + path: Controller/ListController.php + + - + message: "#^Parameter \\#2 \\$webspace of method Sulu\\\\Bundle\\\\FormBundle\\\\Provider\\\\ListProviderRegistry\\:\\:getEntityName\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Controller/ListController.php + + - + message: "#^Parameter \\#2 \\$webspace of method Sulu\\\\Bundle\\\\FormBundle\\\\Provider\\\\ListProviderRegistry\\:\\:getFieldDescriptors\\(\\) expects string, mixed given\\.$#" + count: 2 + path: Controller/ListController.php + + - + message: "#^Parameter \\#3 \\$locale of method Sulu\\\\Bundle\\\\FormBundle\\\\Provider\\\\ListProviderRegistry\\:\\:getEntityName\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Controller/ListController.php + + - + message: "#^Parameter \\#3 \\$locale of method Sulu\\\\Bundle\\\\FormBundle\\\\Provider\\\\ListProviderRegistry\\:\\:getFieldDescriptors\\(\\) expects string, mixed given\\.$#" + count: 2 + path: Controller/ListController.php + + - + message: "#^Parameter \\#3 \\$route of class Sulu\\\\Component\\\\Rest\\\\ListBuilder\\\\ListRepresentation constructor expects string, mixed given\\.$#" + count: 1 + path: Controller/ListController.php + + - + message: "#^Parameter \\#4 \\$uuid of method Sulu\\\\Bundle\\\\FormBundle\\\\Provider\\\\ListProviderRegistry\\:\\:getEntityName\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Controller/ListController.php + + - + message: "#^Parameter \\#4 \\$uuid of method Sulu\\\\Bundle\\\\FormBundle\\\\Provider\\\\ListProviderRegistry\\:\\:getFieldDescriptors\\(\\) expects string, mixed given\\.$#" + count: 2 + path: Controller/ListController.php + + - + message: "#^Parameter \\#2 \\$haystack of function in_array expects array, array\\|bool\\|float\\|int\\|string\\|null given\\.$#" + count: 1 + path: DependencyInjection/CompilerPass/RemoveTaggedServiceCollectorCompilerPass.php + + - + message: "#^Cannot access offset 'helper' on mixed\\.$#" + count: 1 + path: DependencyInjection/SuluFormExtension.php + + - + message: "#^Cannot access offset 'lists' on array\\|false\\.$#" + count: 1 + path: Dynamic/Helper/MailchimpListSelect.php + + - + message: "#^Property Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Helper\\\\MailchimpListSelect\\:\\:\\$apiKey \\(string\\) does not accept string\\|null\\.$#" + count: 1 + path: Dynamic/Helper/MailchimpListSelect.php + + - + message: "#^Cannot access an offset on mixed\\.$#" + count: 2 + path: Dynamic/Types/AttachmentType.php + + - + message: "#^Cannot access offset 'accept' on mixed\\.$#" + count: 1 + path: Dynamic/Types/AttachmentType.php + + - + message: "#^Cannot access offset 'max' on mixed\\.$#" + count: 1 + path: Dynamic/Types/AttachmentType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/AttachmentType.php + + - + message: "#^Cannot call method getOption\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 4 + path: Dynamic/Types/AttachmentType.php + + - + message: "#^Cannot cast mixed to int\\.$#" + count: 1 + path: Dynamic/Types/AttachmentType.php + + - + message: "#^Cannot access offset 'placeholder' on mixed\\.$#" + count: 3 + path: Dynamic/Types/CheckboxMultipleType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/CheckboxMultipleType.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Types\\\\CheckboxMultipleType\\:\\:getDefaultOptions\\(\\) should return array\\ but returns array\\\\|false\\.$#" + count: 1 + path: Dynamic/Types/CheckboxMultipleType.php + + - + message: "#^Parameter \\#1 \\$keys of function array_combine expects array\\, array\\\\|false given\\.$#" + count: 1 + path: Dynamic/Types/CheckboxMultipleType.php + + - + message: "#^Parameter \\#1 \\$translation of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Types\\\\CheckboxMultipleType\\:\\:getChoiceOptions\\(\\) expects Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation, Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null given\\.$#" + count: 1 + path: Dynamic/Types/CheckboxMultipleType.php + + - + message: "#^Parameter \\#1 \\$value of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Types\\\\CheckboxMultipleType\\:\\:getDefaultOptions\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Dynamic/Types/CheckboxMultipleType.php + + - + message: "#^Parameter \\#2 \\$subject of function preg_split expects string, mixed given\\.$#" + count: 1 + path: Dynamic/Types/CheckboxMultipleType.php + + - + message: "#^Parameter \\#2 \\$values of function array_combine expects array, array\\\\|false given\\.$#" + count: 1 + path: Dynamic/Types/CheckboxMultipleType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/CheckboxType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/CityType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/CompanyType.php + + - + message: "#^Cannot access offset 'placeholder' on mixed\\.$#" + count: 3 + path: Dynamic/Types/CountryType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/CountryType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/DateType.php + + - + message: "#^Cannot access offset 'placeholder' on mixed\\.$#" + count: 3 + path: Dynamic/Types/DropdownMultiple.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/DropdownMultiple.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Types\\\\DropdownMultiple\\:\\:getDefaultOptions\\(\\) should return array\\ but returns array\\\\|false\\.$#" + count: 1 + path: Dynamic/Types/DropdownMultiple.php + + - + message: "#^Parameter \\#1 \\$keys of function array_combine expects array\\, array\\\\|false given\\.$#" + count: 1 + path: Dynamic/Types/DropdownMultiple.php + + - + message: "#^Parameter \\#1 \\$translation of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Types\\\\DropdownMultiple\\:\\:getChoiceOptions\\(\\) expects Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation, Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null given\\.$#" + count: 1 + path: Dynamic/Types/DropdownMultiple.php + + - + message: "#^Parameter \\#1 \\$value of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Types\\\\DropdownMultiple\\:\\:getDefaultOptions\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Dynamic/Types/DropdownMultiple.php + + - + message: "#^Parameter \\#2 \\$subject of function preg_split expects string, mixed given\\.$#" + count: 1 + path: Dynamic/Types/DropdownMultiple.php + + - + message: "#^Parameter \\#2 \\$values of function array_combine expects array, array\\\\|false given\\.$#" + count: 1 + path: Dynamic/Types/DropdownMultiple.php + + - + message: "#^Cannot access offset 'placeholder' on mixed\\.$#" + count: 3 + path: Dynamic/Types/DropdownType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/DropdownType.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Types\\\\DropdownType\\:\\:getDefaultOptions\\(\\) should return array\\ but returns array\\\\|false\\.$#" + count: 1 + path: Dynamic/Types/DropdownType.php + + - + message: "#^Parameter \\#1 \\$keys of function array_combine expects array\\, array\\\\|false given\\.$#" + count: 1 + path: Dynamic/Types/DropdownType.php + + - + message: "#^Parameter \\#1 \\$translation of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Types\\\\DropdownType\\:\\:getChoiceOptions\\(\\) expects Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation, Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null given\\.$#" + count: 1 + path: Dynamic/Types/DropdownType.php + + - + message: "#^Parameter \\#2 \\$subject of function preg_split expects string, mixed given\\.$#" + count: 1 + path: Dynamic/Types/DropdownType.php + + - + message: "#^Parameter \\#2 \\$values of function array_combine expects array, array\\\\|false given\\.$#" + count: 1 + path: Dynamic/Types/DropdownType.php + + - + message: "#^Cannot access an offset on mixed\\.$#" + count: 1 + path: Dynamic/Types/EmailType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/EmailType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/FaxType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/FirstNameType.php + + - + message: "#^Cannot access offset 'type' on mixed\\.$#" + count: 1 + path: Dynamic/Types/FreeTextType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/FreeTextType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/FunctionType.php + + - + message: "#^Cannot access offset 'type' on mixed\\.$#" + count: 1 + path: Dynamic/Types/HeadlineType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/HeadlineType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/LastNameType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/MailchimpType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/PhoneType.php + + - + message: "#^Cannot access offset 'placeholder' on mixed\\.$#" + count: 3 + path: Dynamic/Types/RadioButtonsType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/RadioButtonsType.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Types\\\\RadioButtonsType\\:\\:getDefaultOptions\\(\\) should return array\\ but returns array\\\\|false\\.$#" + count: 1 + path: Dynamic/Types/RadioButtonsType.php + + - + message: "#^Parameter \\#1 \\$keys of function array_combine expects array\\, array\\\\|false given\\.$#" + count: 1 + path: Dynamic/Types/RadioButtonsType.php + + - + message: "#^Parameter \\#1 \\$translation of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Types\\\\RadioButtonsType\\:\\:getChoiceOptions\\(\\) expects Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation, Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null given\\.$#" + count: 1 + path: Dynamic/Types/RadioButtonsType.php + + - + message: "#^Parameter \\#2 \\$subject of function preg_split expects string, mixed given\\.$#" + count: 1 + path: Dynamic/Types/RadioButtonsType.php + + - + message: "#^Parameter \\#2 \\$values of function array_combine expects array, array\\\\|false given\\.$#" + count: 1 + path: Dynamic/Types/RadioButtonsType.php + + - + message: "#^Cannot access offset 'options' on mixed\\.$#" + count: 1 + path: Dynamic/Types/RecaptchaType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/RecaptchaType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/SalutationType.php + + - + message: "#^Cannot access offset 'type' on mixed\\.$#" + count: 1 + path: Dynamic/Types/SpacerType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/SpacerType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/StateType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/StreetType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/TextType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/TextareaType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/TitleType.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Dynamic/Types/ZipType.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getAttachment\\(\\) should return array\\\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getCheckbox\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getCheckboxMultiple\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getCity\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getCompany\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getCountry\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getData\\(\\) should return array but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getDate\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getDropdown\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getDropdownMultiple\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getEmail\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getFax\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getFirstName\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getForm\\(\\) should return Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Form but returns Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Form\\|null\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getFunction\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getLastName\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getPhone\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getRadioButtons\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getSalutation\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getState\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getStreet\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getText\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getTextarea\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getTitle\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:getZip\\(\\) should return string\\|null but returns mixed\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Property Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:\\$data \\(string\\|null\\) does not accept string\\|false\\.$#" + count: 2 + path: Entity/Dynamic.php + + - + message: "#^Property Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\:\\:\\$webspaceKey \\(string\\) does not accept string\\|null\\.$#" + count: 1 + path: Entity/Dynamic.php + + - + message: "#^Cannot call method getDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Entity/Form.php + + - + message: "#^Cannot call method getFromEmail\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Entity/Form.php + + - + message: "#^Cannot call method getFromName\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Entity/Form.php + + - + message: "#^Cannot call method getMailText\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Entity/Form.php + + - + message: "#^Cannot call method getOptions\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Entity/Form.php + + - + message: "#^Cannot call method getPlaceholder\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Entity/Form.php + + - + message: "#^Cannot call method getShortTitle\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Entity/Form.php + + - + message: "#^Cannot call method getSubject\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Entity/Form.php + + - + message: "#^Cannot call method getSubmitLabel\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Entity/Form.php + + - + message: "#^Cannot call method getSuccessText\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Entity/Form.php + + - + message: "#^Cannot call method getTitle\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Entity/Form.php + + - + message: "#^Cannot call method getTitle\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Entity/Form.php + + - + message: "#^Cannot call method getToEmail\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Entity/Form.php + + - + message: "#^Cannot call method getToName\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Entity/Form.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\:\\:getOptions\\(\\) should return array but returns mixed\\.$#" + count: 1 + path: Entity/FormFieldTranslation.php + + - + message: "#^Property Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\:\\:\\$defaultValue \\(string\\|null\\) does not accept mixed\\.$#" + count: 1 + path: Entity/FormFieldTranslation.php + + - + message: "#^Property Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\:\\:\\$options \\(string\\|null\\) does not accept string\\|false\\|null\\.$#" + count: 1 + path: Entity/FormFieldTranslation.php + + - + message: "#^Property Sulu\\\\Bundle\\\\FormBundle\\\\Event\\\\DynFormSavedEvent\\:\\:\\$dynamic \\(Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\) does not accept Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Dynamic\\|null\\.$#" + count: 1 + path: Event/DynFormSavedEvent.php + + - + message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" + count: 1 + path: Event/MailchimpListSubscriber.php + + - + message: "#^Cannot access offset 'listId' on mixed\\.$#" + count: 1 + path: Event/MailchimpListSubscriber.php + + - + message: "#^Cannot access offset 'options' on mixed\\.$#" + count: 1 + path: Event/MailchimpListSubscriber.php + + - + message: "#^Cannot access offset 'type' on mixed\\.$#" + count: 4 + path: Event/MailchimpListSubscriber.php + + - + message: "#^Cannot access offset 'value' on mixed\\.$#" + count: 4 + path: Event/MailchimpListSubscriber.php + + - + message: "#^Parameter \\#1 \\$email of method DrewM\\\\MailChimp\\\\MailChimp\\:\\:subscriberHash\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Event/MailchimpListSubscriber.php + + - + message: "#^Parameter \\#1 \\$haystack of function strpos expects string, mixed given\\.$#" + count: 1 + path: Event/ProtectedMediaSubscriber.php + + - + message: "#^Parameter \\#2 \\.\\.\\.\\$arrays of function array_merge expects array, mixed given\\.$#" + count: 1 + path: Event/ProtectedMediaSubscriber.php + + - + message: "#^In method \"Sulu\\\\Bundle\\\\FormBundle\\\\Event\\\\RequestListener\\:\\:onKernelRequest\", caught \"Exception\" must be rethrown\\. Either catch a more specific exception or add a \"throw\" clause in the \"catch\" block to propagate the exception\\. More info\\: http\\://bit\\.ly/failloud$#" + count: 1 + path: Event/RequestListener.php + + - + message: "#^Array \\(array\\\\) does not accept Symfony\\\\Component\\\\Form\\\\FormInterface\\|null\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Cannot access offset 'checksum' on array\\|bool\\|float\\|int\\|string\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Cannot access offset 'formId' on array\\|bool\\|float\\|int\\|string\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Cannot access offset 'formName' on array\\|bool\\|float\\|int\\|string\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Cannot access offset 'type' on array\\|bool\\|float\\|int\\|string\\.$#" + count: 2 + path: Form/Builder.php + + - + message: "#^Cannot access offset 'typeId' on array\\|bool\\|float\\|int\\|string\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Cannot call method get\\(\\) on Symfony\\\\Component\\\\HttpFoundation\\\\Request\\|null\\.$#" + count: 3 + path: Form/Builder.php + + - + message: "#^Cannot call method getAttribute\\(\\) on mixed\\.$#" + count: 2 + path: Form/Builder.php + + - + message: "#^Cannot call method getLocale\\(\\) on Symfony\\\\Component\\\\HttpFoundation\\\\Request\\|null\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Parameter \\#1 \\$checksum of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Checksum\\:\\:check\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Parameter \\#1 \\$id of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Builder\\:\\:build\\(\\) expects int, mixed given\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Parameter \\#2 \\$type of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Checksum\\:\\:check\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Parameter \\#2 \\$type of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Builder\\:\\:build\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Parameter \\#3 \\$typeId of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Checksum\\:\\:check\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Parameter \\#3 \\$typeId of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Builder\\:\\:build\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Parameter \\#4 \\$formId of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Checksum\\:\\:check\\(\\) expects int, mixed given\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Parameter \\#4 \\$locale of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Builder\\:\\:build\\(\\) expects string\\|null, mixed given\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Parameter \\#5 \\$formName of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Checksum\\:\\:check\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Parameter \\#5 \\$name of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Builder\\:\\:build\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Parameter \\#6 \\$webspaceKey of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Builder\\:\\:createForm\\(\\) expects string, string\\|null given\\.$#" + count: 1 + path: Form/Builder.php + + - + message: "#^Parameter \\#1 \\$object of method Doctrine\\\\Persistence\\\\ObjectManager\\:\\:persist\\(\\) expects object, mixed given\\.$#" + count: 1 + path: Form/Handler.php + + - + message: "#^Parameter \\#1 \\$subject of method Sulu\\\\Bundle\\\\FormBundle\\\\Mail\\\\HelperInterface\\:\\:sendMail\\(\\) expects array\\\\|string, string\\|null given\\.$#" + count: 1 + path: Form/Handler.php + + - + message: "#^Parameter \\#2 \\$mediaIds of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Handler\\:\\:mapMediaIds\\(\\) expects array\\, array given\\.$#" + count: 1 + path: Form/Handler.php + + - + message: "#^Parameter \\#4 \\$collectionId of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Handler\\:\\:getMediaData\\(\\) expects int, mixed given\\.$#" + count: 1 + path: Form/Handler.php + + - + message: "#^Cannot access offset string on mixed\\.$#" + count: 2 + path: Form/Type/AbstractType.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getBlockPrefix\\(\\) should return string but returns string\\|null\\.$#" + count: 1 + path: Form/Type/AbstractType.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getCustomerFromMailAddress\\(\\) should return string but returns mixed\\.$#" + count: 1 + path: Form/Type/AbstractType.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getCustomerReplyToMailAddress\\(\\) should return string but returns mixed\\.$#" + count: 1 + path: Form/Type/AbstractType.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getCustomerToMailAddress\\(\\) should return string but returns mixed\\.$#" + count: 1 + path: Form/Type/AbstractType.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getMailText\\(\\) should return string but returns mixed\\.$#" + count: 1 + path: Form/Type/AbstractType.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getNotifyFromMailAddress\\(\\) should return string but returns mixed\\.$#" + count: 1 + path: Form/Type/AbstractType.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getNotifyReplyToMailAddress\\(\\) should return string but returns mixed\\.$#" + count: 1 + path: Form/Type/AbstractType.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getNotifyToMailAddress\\(\\) should return string but returns mixed\\.$#" + count: 1 + path: Form/Type/AbstractType.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getSubmitLabel\\(\\) should return string but returns mixed\\.$#" + count: 1 + path: Form/Type/AbstractType.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getSuccessText\\(\\) should return string but returns mixed\\.$#" + count: 1 + path: Form/Type/AbstractType.php + + - + message: "#^Parameter \\#1 \\$formData of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getCustomerMail\\(\\) expects array, mixed given\\.$#" + count: 1 + path: Form/Type/AbstractType.php + + - + message: "#^Parameter \\#1 \\$formData of method Sulu\\\\Bundle\\\\FormBundle\\\\Form\\\\Type\\\\AbstractType\\:\\:getNotifyMail\\(\\) expects array, mixed given\\.$#" + count: 1 + path: Form/Type/AbstractType.php + + - + message: "#^Parameter \\#1 \\$formEntityId of class Sulu\\\\Bundle\\\\FormBundle\\\\Exception\\\\FormNotFoundException constructor expects int, int\\|null given\\.$#" + count: 1 + path: Form/Type/DynamicFormType.php + + - + message: "#^Parameter \\#1 \\$locale of method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Form\\:\\:getTranslation\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Form/Type/DynamicFormType.php + + - + message: "#^Parameter \\#1 \\$locale of method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormField\\:\\:getTranslation\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Form/Type/DynamicFormType.php + + - + message: "#^Parameter \\#1 \\$type of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Checksum\\:\\:get\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Form/Type/DynamicFormType.php + + - + message: "#^Parameter \\#2 \\$locale of class Sulu\\\\Bundle\\\\FormBundle\\\\Exception\\\\FormNotFoundException constructor expects string, mixed given\\.$#" + count: 1 + path: Form/Type/DynamicFormType.php + + - + message: "#^Parameter \\#2 \\$typeId of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Checksum\\:\\:get\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Form/Type/DynamicFormType.php + + - + message: "#^Parameter \\#3 \\$formId of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Checksum\\:\\:get\\(\\) expects int, int\\|null given\\.$#" + count: 1 + path: Form/Type/DynamicFormType.php + + - + message: "#^Parameter \\#3 \\$locale of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\FormFieldTypeInterface\\:\\:build\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Form/Type/DynamicFormType.php + + - + message: "#^Parameter \\#4 \\$formName of method Sulu\\\\Bundle\\\\FormBundle\\\\Dynamic\\\\Checksum\\:\\:get\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Form/Type/DynamicFormType.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\ListBuilder\\\\DynamicListBuilder\\:\\:toString\\(\\) should return string but returns float\\|int\\|string\\.$#" + count: 1 + path: ListBuilder/DynamicListBuilder.php + + - + message: "#^Parameter \\#1 \\$value of class Sulu\\\\Bundle\\\\FormBundle\\\\Exception\\\\InvalidListBuilderValueException constructor expects string, string\\|false given\\.$#" + count: 1 + path: ListBuilder/DynamicListBuilder.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\ListBuilder\\\\DynamicListFactory\\:\\:build\\(\\) should return array\\ but returns array\\\\.$#" + count: 1 + path: ListBuilder/DynamicListFactory.php + + - + message: "#^Parameter \\#1 \\$string of function strip_tags expects string, string\\|null given\\.$#" + count: 1 + path: ListBuilder/DynamicListFactory.php + + - + message: "#^Parameter \\#1 \\$addresses of method Swift_Mime_SimpleMessage\\:\\:setFrom\\(\\) expects array\\|string, array\\\\|string\\|null given\\.$#" + count: 1 + path: Mail/Helper.php + + - + message: "#^Parameter \\#1 \\$body of method Swift_Message\\:\\:addPart\\(\\) expects string\\|Swift_OutputByteStream, array\\\\|string given\\.$#" + count: 1 + path: Mail/Helper.php + + - + message: "#^Parameter \\#1 \\$subject of class Swift_Message constructor expects string\\|null, array\\\\|string given\\.$#" + count: 1 + path: Mail/Helper.php + + - + message: "#^Parameter \\#2 \\$body of class Swift_Message constructor expects string\\|null, array\\\\|string given\\.$#" + count: 1 + path: Mail/Helper.php + + - + message: "#^Parameter \\#1 \\$address of class Symfony\\\\Component\\\\Mime\\\\Address constructor expects string, int\\|string given\\.$#" + count: 1 + path: Mail/MailerHelper.php + + - + message: "#^Parameter \\#1 \\$fromMail of method Sulu\\\\Bundle\\\\FormBundle\\\\Mail\\\\MailerHelper\\:\\:logMessage\\(\\) expects array\\\\|string, array\\\\|string\\|null given\\.$#" + count: 1 + path: Mail/MailerHelper.php + + - + message: "#^Parameter \\#1 \\$fromMail of method Sulu\\\\Bundle\\\\FormBundle\\\\Mail\\\\MailerHelper\\:\\:parseToAddresses\\(\\) expects array\\\\|string, array\\\\|string\\|null given\\.$#" + count: 3 + path: Mail/MailerHelper.php + + - + message: "#^Parameter \\#2 \\$subject of method Sulu\\\\Bundle\\\\FormBundle\\\\Mail\\\\MailerHelper\\:\\:setHeaders\\(\\) expects string, array\\\\|string given\\.$#" + count: 1 + path: Mail/MailerHelper.php + + - + message: "#^Parameter \\#2 \\$toMail of method Sulu\\\\Bundle\\\\FormBundle\\\\Mail\\\\MailerHelper\\:\\:logMessage\\(\\) expects array\\\\|string, array\\\\|string\\|null given\\.$#" + count: 1 + path: Mail/MailerHelper.php + + - + message: "#^Parameter \\#3 \\$body of method Sulu\\\\Bundle\\\\FormBundle\\\\Mail\\\\MailerHelper\\:\\:setBody\\(\\) expects string, array\\\\|string given\\.$#" + count: 1 + path: Mail/MailerHelper.php + + - + message: "#^Parameter \\#3 \\$replyTo of method Sulu\\\\Bundle\\\\FormBundle\\\\Mail\\\\MailerHelper\\:\\:logMessage\\(\\) expects array\\\\|string, array\\\\|string\\|null given\\.$#" + count: 1 + path: Mail/MailerHelper.php + + - + message: "#^Parameter \\#4 \\$plainText of method Sulu\\\\Bundle\\\\FormBundle\\\\Mail\\\\MailerHelper\\:\\:setBody\\(\\) expects string\\|null, array\\\\|string\\|null given\\.$#" + count: 1 + path: Mail/MailerHelper.php + + - + message: "#^Parameter \\#4 \\$subject of method Sulu\\\\Bundle\\\\FormBundle\\\\Mail\\\\MailerHelper\\:\\:logMessage\\(\\) expects string, array\\\\|string given\\.$#" + count: 1 + path: Mail/MailerHelper.php + + - + message: "#^Parameter \\#5 \\$ccMail of method Sulu\\\\Bundle\\\\FormBundle\\\\Mail\\\\MailerHelper\\:\\:logMessage\\(\\) expects array\\, array\\\\|string given\\.$#" + count: 1 + path: Mail/MailerHelper.php + + - + message: "#^Parameter \\#6 \\$bccMail of method Sulu\\\\Bundle\\\\FormBundle\\\\Mail\\\\MailerHelper\\:\\:logMessage\\(\\) expects array\\, array\\\\|string given\\.$#" + count: 1 + path: Mail/MailerHelper.php + + - + message: "#^Parameter \\#7 \\$plainText of method Sulu\\\\Bundle\\\\FormBundle\\\\Mail\\\\MailerHelper\\:\\:logMessage\\(\\) expects string\\|null, array\\\\|string\\|null given\\.$#" + count: 1 + path: Mail/MailerHelper.php + + - + message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" + count: 2 + path: Manager/FormManager.php + + - + message: "#^Cannot access offset 'email' on mixed\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot access offset 'name' on mixed\\.$#" + count: 2 + path: Manager/FormManager.php + + - + message: "#^Cannot access offset 'type' on mixed\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method getId\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method getId\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method getSendAttachments\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setChanged\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setDeactivateAttachmentSave\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setDeactivateCustomerMails\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setDeactivateNotifyMails\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setDefaultValue\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setField\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setForm\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setFromEmail\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setFromName\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setMailText\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setOptions\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setPlaceholder\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setReplyTo\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setSendAttachments\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setShortTitle\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setSubject\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setSubmitLabel\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setSuccessText\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setTitle\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setTitle\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setToEmail\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Cannot call method setToName\\(\\) on Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$array of function array_column expects array, mixed given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$data of static method Sulu\\\\Bundle\\\\FormBundle\\\\Manager\\\\FormManager\\:\\:getValue\\(\\) expects array, mixed given\\.$#" + count: 9 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$datetime of class DateTime constructor expects string, mixed given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$defaultLocale of method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Form\\:\\:setDefaultLocale\\(\\) expects string, string\\|null given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$email of method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslationReceiver\\:\\:setEmail\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$id of method Sulu\\\\Bundle\\\\FormBundle\\\\Manager\\\\FormManager\\:\\:findById\\(\\) expects int, int\\|null given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$key of method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Form\\:\\:getField\\(\\) expects string\\|null, mixed given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$locale of method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Form\\:\\:getTranslation\\(\\) expects string, string\\|null given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$name of method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslationReceiver\\:\\:setName\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$required of method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormField\\:\\:setRequired\\(\\) expects bool, mixed given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$translation of method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Form\\:\\:addTranslation\\(\\) expects Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation, Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$translation of method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormField\\:\\:addTranslation\\(\\) expects Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation, Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormFieldTranslation\\|null given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$type of method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormField\\:\\:setType\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$type of method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslationReceiver\\:\\:setType\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$type of method Sulu\\\\Bundle\\\\FormBundle\\\\Manager\\\\FormManager\\:\\:getUniqueKey\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$width of method Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormField\\:\\:setWidth\\(\\) expects string, mixed given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#2 \\$array of function array_key_exists expects array, mixed given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#2 \\$translation of method Sulu\\\\Bundle\\\\FormBundle\\\\Manager\\\\FormManager\\:\\:updateReceivers\\(\\) expects Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation, Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\FormTranslation\\|null given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#3 \\$locale of method Sulu\\\\Bundle\\\\FormBundle\\\\Manager\\\\FormManager\\:\\:updateFields\\(\\) expects string, string\\|null given\\.$#" + count: 1 + path: Manager/FormManager.php + + - + message: "#^Parameter \\#1 \\$title of method Sulu\\\\Bundle\\\\FormBundle\\\\Media\\\\CollectionStrategyTree\\:\\:createCollection\\(\\) expects string, string\\|null given\\.$#" + count: 1 + path: Media/CollectionStrategyTree.php + + - + message: "#^Cannot call method getItems\\(\\) on mixed\\.$#" + count: 1 + path: Metadata/DynamicFormMetadataLoader.php + + - + message: "#^Cannot call method getName\\(\\) on Sulu\\\\Bundle\\\\AdminBundle\\\\Metadata\\\\FormMetadata\\\\FormMetadata\\|false\\.$#" + count: 1 + path: Metadata/DynamicFormMetadataLoader.php + + - + message: "#^Cannot call method getProperties\\(\\) on mixed\\.$#" + count: 1 + path: Metadata/DynamicFormMetadataLoader.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Metadata\\\\DynamicFormMetadataLoader\\:\\:getMetadata\\(\\) should return Sulu\\\\Bundle\\\\AdminBundle\\\\Metadata\\\\MetadataInterface\\|null but returns mixed\\.$#" + count: 1 + path: Metadata/DynamicFormMetadataLoader.php + + - + message: "#^Parameter \\#1 \\$data of function unserialize expects string, string\\|false given\\.$#" + count: 1 + path: Metadata/DynamicFormMetadataLoader.php + + - + message: "#^Cannot call method item\\(\\) on DOMNodeList\\|false\\.$#" + count: 1 + path: Metadata/PropertiesXmlLoader.php + + - + message: "#^Parameter \\#3 \\$context of method Sulu\\\\Component\\\\Content\\\\Metadata\\\\Parser\\\\PropertiesXmlParser\\:\\:load\\(\\) expects DOMNode, DOMNode\\|null given\\.$#" + count: 1 + path: Metadata/PropertiesXmlLoader.php + + - + message: "#^Cannot cast mixed to int\\.$#" + count: 1 + path: Repository/DynamicRepository.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Repository\\\\DynamicRepository\\:\\:findByFilters\\(\\) should return array but returns mixed\\.$#" + count: 1 + path: Repository/DynamicRepository.php + + - + message: "#^Parameter \\#2 \\$fromDate of method Sulu\\\\Bundle\\\\FormBundle\\\\Repository\\\\DynamicRepository\\:\\:addDateRangeFilter\\(\\) expects string\\|null, mixed given\\.$#" + count: 1 + path: Repository/DynamicRepository.php + + - + message: "#^Parameter \\#2 \\$search of method Sulu\\\\Bundle\\\\FormBundle\\\\Repository\\\\DynamicRepository\\:\\:addSearchFilter\\(\\) expects string\\|null, mixed given\\.$#" + count: 1 + path: Repository/DynamicRepository.php + + - + message: "#^Parameter \\#3 \\$searchFields of method Sulu\\\\Bundle\\\\FormBundle\\\\Repository\\\\DynamicRepository\\:\\:addSearchFilter\\(\\) expects array\\\\|null, mixed given\\.$#" + count: 1 + path: Repository/DynamicRepository.php + + - + message: "#^Parameter \\#3 \\$toDate of method Sulu\\\\Bundle\\\\FormBundle\\\\Repository\\\\DynamicRepository\\:\\:addDateRangeFilter\\(\\) expects string\\|null, mixed given\\.$#" + count: 1 + path: Repository/DynamicRepository.php + + - + message: "#^Cannot cast mixed to int\\.$#" + count: 1 + path: Repository/FormRepository.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Repository\\\\FormRepository\\:\\:getValue\\(\\) should return int\\|null but returns mixed\\.$#" + count: 2 + path: Repository/FormRepository.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Repository\\\\FormRepository\\:\\:loadAll\\(\\) should return array\\ but returns mixed\\.$#" + count: 1 + path: Repository/FormRepository.php + + - + message: "#^Method Sulu\\\\Bundle\\\\FormBundle\\\\Repository\\\\FormRepository\\:\\:loadById\\(\\) should return Sulu\\\\Bundle\\\\FormBundle\\\\Entity\\\\Form\\|null but returns mixed\\.$#" + count: 1 + path: Repository/FormRepository.php + + - + message: "#^Cannot access property \\$attributes on Symfony\\\\Component\\\\HttpFoundation\\\\Request\\|null\\.$#" + count: 1 + path: TitleProvider/StructureTitleProvider.php + diff --git a/phpstan.neon b/phpstan.neon index e7b2b211..f47adc4c 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -10,8 +10,8 @@ includes: parameters: paths: - . - level: 5 - excludes_analyse: + level: max + excludePaths: - %currentWorkingDirectory%/vendor/* - %currentWorkingDirectory%/Tests/* - %currentWorkingDirectory%/DependencyInjection/Configuration.php @@ -20,8 +20,3 @@ parameters: console_application_loader: Tests/phpstan/console-application.php doctrine: objectManagerLoader: Tests/phpstan/object-manager.php - ignoreErrors: - - '#Cannot assign offset \x27[a-zA-Z0-9\\_]+\x27 to string.#' #\x27 represents the single quote character ' - - - message: '#caught "Exception" must be rethrown#' - path: Event/RequestListener.php