File tree Expand file tree Collapse file tree 4 files changed +13
-10
lines changed
Expand file tree Collapse file tree 4 files changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public function configureOptions(OptionsResolver $resolver): void
2525
2626 $ resolver ->setDefault (
2727 'choices ' ,
28- fn (Options $ options ): array => $ this ->getContentTypes ($ options ),
28+ fn (Options $ options ): array => $ this ->getContentTypes ($ options[ ' types ' ] ),
2929 );
3030
3131 $ resolver ->setDefault ('choice_translation_domain ' , false );
@@ -45,14 +45,15 @@ public function getParent(): string
4545 /**
4646 * Returns the allowed content types from Ibexa CMS.
4747 *
48+ * @param array<string, string[]|bool> $configuredGroups
49+ *
4850 * @return array<string, string[]>
4951 */
50- private function getContentTypes (Options $ options ): array
52+ private function getContentTypes (array $ configuredGroups ): array
5153 {
5254 $ allContentTypes = [];
5355
5456 $ groups = $ this ->contentTypeService ->loadContentTypeGroups ();
55- $ configuredGroups = $ options ['types ' ];
5657
5758 foreach ($ groups as $ group ) {
5859 $ configuredGroups += [$ group ->identifier => true ];
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public function configureOptions(OptionsResolver $resolver): void
2525
2626 $ resolver ->setDefault (
2727 'choices ' ,
28- fn (Options $ options ): array => $ this ->getObjectStates ($ options ),
28+ fn (Options $ options ): array => $ this ->getObjectStates ($ options[ ' states ' ] ),
2929 );
3030
3131 $ resolver ->setDefault ('choice_translation_domain ' , false );
@@ -45,14 +45,15 @@ public function getParent(): string
4545 /**
4646 * Returns the allowed content states from Ibexa CMS.
4747 *
48+ * @param array<string, string[]|bool> $configuredGroups
49+ *
4850 * @return array<string, string[]>
4951 */
50- private function getObjectStates (Options $ options ): array
52+ private function getObjectStates (array $ configuredGroups ): array
5153 {
5254 $ allObjectStates = [];
5355
5456 $ groups = $ this ->objectStateService ->loadObjectStateGroups ();
55- $ configuredGroups = $ options ['states ' ];
5657
5758 foreach ($ groups as $ group ) {
5859 $ configuredGroups += [$ group ->identifier => true ];
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public function configureOptions(OptionsResolver $resolver): void
2525
2626 $ resolver ->setDefault (
2727 'choices ' ,
28- fn (Options $ options ): array => $ this ->getSections ($ options ),
28+ fn (Options $ options ): array => $ this ->getSections ($ options[ ' sections ' ] ),
2929 );
3030
3131 $ resolver ->setDefault ('choice_translation_domain ' , false );
@@ -45,15 +45,16 @@ public function getParent(): string
4545 /**
4646 * Returns the allowed sections from Ibexa CMS.
4747 *
48+ * @param array<string, string[]> $configuredSections
49+ *
4850 * @return array<string, string>
4951 */
50- private function getSections (Options $ options ): array
52+ private function getSections (array $ configuredSections ): array
5153 {
5254 $ allSections = [];
5355
5456 /** @var \Ibexa\Contracts\Core\Repository\Values\Content\Section[] $sections */
5557 $ sections = $ this ->sectionService ->loadSections ();
56- $ configuredSections = $ options ['sections ' ];
5758
5859 foreach ($ sections as $ section ) {
5960 if (count ($ configuredSections ) > 0 && !in_array ($ section ->identifier , $ configuredSections , true )) {
Original file line number Diff line number Diff line change @@ -7,5 +7,5 @@ parameters:
77 ignoreErrors :
88 # Symfony
99
10- - '#with generic interface Symfony\\Component\\ ( Form|OptionsResolver ) \\\w+ but does not specify its types : ( TData|TArray) #'
10+ - ' #with generic interface Symfony\\Component\\Form\\\w+ but does not specify its types : TData #'
1111 - ' #extends generic class Symfony\\Component\\Form\\\w+ but does not specify its types : TData #'
You can’t perform that action at this time.
0 commit comments