From 4b4bcaa147b81c3d600c50f55739b441931c365b Mon Sep 17 00:00:00 2001 From: Sonata CI Date: Wed, 3 Apr 2024 11:54:08 +0100 Subject: [PATCH] DevKit updates for 2.x branch (#507) Co-authored-by: Vincent Langlet --- .php-cs-fixer.dist.php | 2 +- tests/Mapper/Builder/OptionsBuilderTest.php | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index d197afd5..67707a5e 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -45,7 +45,7 @@ 'no_useless_return' => true, 'no_superfluous_elseif' => true, 'no_superfluous_phpdoc_tags' => ['allow_mixed' => true, 'remove_inheritdoc' => true], - 'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true], + 'nullable_type_declaration_for_default_null_value' => true, 'ordered_class_elements' => true, 'ordered_imports' => ['sort_algorithm' => 'alpha', 'imports_order' => ['class', 'function', 'const']], 'phpdoc_order' => ['order' => ['var', 'param', 'throws', 'return', 'phpstan-var', 'psalm-var', 'phpstan-param', 'psalm-param', 'phpstan-return', 'psalm-return']], diff --git a/tests/Mapper/Builder/OptionsBuilderTest.php b/tests/Mapper/Builder/OptionsBuilderTest.php index 349ab624..349196f3 100644 --- a/tests/Mapper/Builder/OptionsBuilderTest.php +++ b/tests/Mapper/Builder/OptionsBuilderTest.php @@ -141,16 +141,18 @@ public function testAddJoin(): void static::assertSame([ 'fieldName' => 'groups', 'targetEntity' => 'App\Entity\Group', - 'joinColumns' => [[ - 'name' => 'parent_id', - 'referencedColumnName' => 'id', - 'onDelete' => 'CASCADE', + 'joinColumns' => [ + [ + 'name' => 'parent_id', + 'referencedColumnName' => 'id', + 'onDelete' => 'CASCADE', + ], + [ + 'name' => 'another_parent_id', + 'referencedColumnName' => 'id', + 'onDelete' => 'CASCADE', + ], ], - [ - 'name' => 'another_parent_id', - 'referencedColumnName' => 'id', - 'onDelete' => 'CASCADE', - ], ], ], $builder->getOptions()); }