diff --git a/src/Block/Service/AbstractCategoriesBlockService.php b/src/Block/Service/AbstractCategoriesBlockService.php index f1fd19a1..8ff0e4cc 100755 --- a/src/Block/Service/AbstractCategoriesBlockService.php +++ b/src/Block/Service/AbstractCategoriesBlockService.php @@ -83,7 +83,9 @@ public function buildEditForm(FormMapper $formMapper, BlockInterface $block) ], ]); - $formMapper->add(ImmutableArrayType::class, [ + $formMapper->add( + ImmutableArrayType::class, + [ 'keys' => [ ['title', TextType::class, [ 'required' => false, diff --git a/src/Block/Service/AbstractCollectionsBlockService.php b/src/Block/Service/AbstractCollectionsBlockService.php index d52513a8..87779778 100755 --- a/src/Block/Service/AbstractCollectionsBlockService.php +++ b/src/Block/Service/AbstractCollectionsBlockService.php @@ -86,7 +86,8 @@ public function buildEditForm(FormMapper $formMapper, BlockInterface $block) $formMapper->add( 'settings', - ImmutableArrayType::class, [ + ImmutableArrayType::class, + [ 'keys' => [ ['title', TextType::class, [ 'required' => false, diff --git a/src/Block/Service/AbstractTagsBlockService.php b/src/Block/Service/AbstractTagsBlockService.php index d30a86e0..92cd7b9b 100755 --- a/src/Block/Service/AbstractTagsBlockService.php +++ b/src/Block/Service/AbstractTagsBlockService.php @@ -84,7 +84,10 @@ public function buildEditForm(FormMapper $formMapper, BlockInterface $block) ], ]); - $formMapper->add('settings', ImmutableArrayType::class, [ + $formMapper->add( + 'settings', + ImmutableArrayType::class, + [ 'keys' => [ ['title', TextType::class, [ 'required' => false, diff --git a/tests/Controller/CategoryAdminControllerTest.php b/tests/Controller/CategoryAdminControllerTest.php index 0d9e4d04..05b72019 100644 --- a/tests/Controller/CategoryAdminControllerTest.php +++ b/tests/Controller/CategoryAdminControllerTest.php @@ -249,16 +249,14 @@ protected function setUp(): void $this->admin->expects($this->any()) ->method('generateUrl') ->willReturnCallback( - - static function ($name, array $parameters = [], $absolute = false) { - $result = $name; - if (!empty($parameters)) { - $result .= '?'.http_build_query($parameters); - } - - return $result; + static function ($name, array $parameters = [], $absolute = false) { + $result = $name; + if (!empty($parameters)) { + $result .= '?'.http_build_query($parameters); } + return $result; + } ); $this->admin->expects($this->any()) @@ -280,7 +278,9 @@ public function testListActionWithoutFilter(): void $result = $this->controller->listAction($this->request); $this->assertInstanceOf( - RedirectResponse::class, $result); + RedirectResponse::class, + $result + ); $this->assertSame('tree?hide_context=0', $result->getTargetUrl()); } @@ -322,8 +322,10 @@ public function testListAction($context): void ->method('getPersistentParameter') ->willReturn($context); - $this->assertInstanceOf(Response::class, - $this->controller->listAction($this->request)); + $this->assertInstanceOf( + Response::class, + $this->controller->listAction($this->request) + ); } public function listActionData() @@ -387,8 +389,10 @@ public function testTreeAction($context, $categories): void ->method('getRootCategoriesSplitByContexts') ->willReturn($categoriesMock); - $this->assertInstanceOf(Response::class, - $this->controller->treeAction($this->request)); + $this->assertInstanceOf( + Response::class, + $this->controller->treeAction($this->request) + ); } public function treeActionData()