From c47a1e9bb4674448c274cec5022d435c17b8ace6 Mon Sep 17 00:00:00 2001 From: Alexis Wurth Date: Sat, 2 Dec 2023 18:31:54 +0100 Subject: [PATCH] cs fix --- .php-cs-fixer.dist.php | 3 ++- src/Twig/LegacyValidatorExtension.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 2bc8c38..3e6cfd0 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -13,7 +13,7 @@ 'cast_spaces' => [ 'space' => 'none', ], - 'compact_nullable_typehint' => true, + 'compact_nullable_type_declaration' => true, 'declare_strict_types' => true, 'native_function_invocation' => [ 'include' => ['@internal'], @@ -21,6 +21,7 @@ 'no_superfluous_elseif' => true, 'no_useless_else' => true, 'no_useless_return' => true, + 'nullable_type_declaration_for_default_null_value' => false, 'ordered_imports' => [ 'imports_order' => [ 'class', diff --git a/src/Twig/LegacyValidatorExtension.php b/src/Twig/LegacyValidatorExtension.php index 8b30b37..b092945 100644 --- a/src/Twig/LegacyValidatorExtension.php +++ b/src/Twig/LegacyValidatorExtension.php @@ -109,8 +109,8 @@ public function getValue(string $key, mixed $context = null): mixed { foreach ($this->asserter->getData() as $validatedValue) { if ( - $validatedValue->getValidation()->getProperty() === $key && - (null === $context || $validatedValue->getValidation()->getContext() === $context) + $validatedValue->getValidation()->getProperty() === $key + && (null === $context || $validatedValue->getValidation()->getContext() === $context) ) { return $validatedValue->getValue(); }