Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3462,12 +3462,6 @@ parameters:
count: 1
path: src/lib/FieldType/Mapper/UserAccountFormMapper.php

-
message: '#^Method Ibexa\\AdminUi\\Form\\ActionDispatcher\\ContentTypeDispatcher\:\:configureOptions\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: src/lib/Form/ActionDispatcher/ContentTypeDispatcher.php

-
message: '#^Method Ibexa\\AdminUi\\Form\\Data\\Content\\CustomUrl\\CustomUrlRemoveData\:\:__construct\(\) has parameter \$urlAliases with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
Expand Down Expand Up @@ -9348,12 +9342,6 @@ parameters:
count: 1
path: src/lib/Validator/Constraints/ValidatorConfigurationValidator.php

-
message: '#^Parameter \#1 \$validationErrors of method Ibexa\\ContentForms\\Validator\\Constraints\\FieldTypeValidator\:\:processValidationErrors\(\) expects array\<Ibexa\\Contracts\\Core\\FieldType\\ValidationError\>, iterable\<Ibexa\\Contracts\\Core\\FieldType\\ValidationError\> given\.$#'
identifier: argument.type
count: 1
path: src/lib/Validator/Constraints/ValidatorConfigurationValidator.php

-
message: '#^Call to an undefined method Symfony\\Component\\Form\\FormInterface\:\:getClickedButton\(\)\.$#'
identifier: method.notFound
Expand Down Expand Up @@ -9660,12 +9648,6 @@ parameters:
count: 1
path: tests/lib/Config/AdminUiForms/ContentTypeFieldTypesResolverTest.php

-
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertNull\(\) with Symfony\\Component\\HttpFoundation\\Response will always evaluate to false\.$#'
identifier: staticMethod.impossibleType
count: 2
path: tests/lib/Event/FormActionEventTest.php

-
message: '#^Method Ibexa\\Tests\\AdminUi\\EventListener\\ContentProxyCreateDraftListenerTest\:\:getContentType\(\) has parameter \$fieldDefs with no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Form/ActionDispatcher/ContentTypeDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@

class ContentTypeDispatcher extends AbstractActionDispatcher
{
protected function configureOptions(OptionsResolver $resolver)
protected function configureOptions(OptionsResolver $resolver): void
{
$resolver->setRequired('languageCode');
}

protected function getActionEventBaseName()
protected function getActionEventBaseName(): string
{
return FormEvents::CONTENT_TYPE_UPDATE;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,23 @@ class ValidatorConfigurationValidator extends FieldTypeValidator
* @param \Ibexa\AdminUi\Form\Data\FieldDefinitionData $value The value that should be validated
* @param \Symfony\Component\Validator\Constraint $constraint The constraint for the validation
*
* @throws \Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException
*
* @api
*/
public function validate($value, Constraint $constraint): void
public function validate(mixed $value, Constraint $constraint): void
{
if (!$value instanceof FieldDefinitionData) {
return;
}

$fieldType = $this->fieldTypeService->getFieldType($value->getFieldTypeIdentifier());
$this->processValidationErrors($fieldType->validateValidatorConfiguration($value->validatorConfiguration));
$this->processValidationErrors(
iterator_to_array($fieldType->validateValidatorConfiguration($value->validatorConfiguration))
);
}

protected function generatePropertyPath($errorIndex, $errorTarget)
protected function generatePropertyPath($errorIndex, $errorTarget): string
{
return 'defaultValue';
}
Expand Down
Loading