File tree 2 files changed +268
-81
lines changed
2 files changed +268
-81
lines changed Original file line number Diff line number Diff line change 14
14
use function array_keys ;
15
15
use function array_map ;
16
16
use function array_merge ;
17
+ use function array_unique ;
18
+ use function array_values ;
17
19
18
20
class EraseComponents implements OptionSourceInterface
19
21
{
@@ -40,18 +42,18 @@ public function toOptionArray(): array
40
42
*/
41
43
private function retrieveDelegateProcessors (): array
42
44
{
43
- return array_keys (
45
+ return array_unique (
44
46
array_merge (
45
47
[],
46
48
...array_map (
47
- fn (string $ resolver ): mixed => $ this ->retrieveArgument ($ resolver , 'processors ' ),
48
- $ this ->retrieveArgument ($ this ->factoryClassName , 'processorResolvers ' , [])
49
+ fn (string $ resolver ): array => array_keys ( $ this ->retrieveArgument ($ resolver , 'processors ' ) ),
50
+ array_values ( $ this ->retrieveArgument ($ this ->factoryClassName , 'processorResolvers ' , []) )
49
51
)
50
52
)
51
53
);
52
54
}
53
55
54
- private function retrieveArgument (string $ className , string $ argumentName , mixed $ defaultValue = null ): mixed
56
+ private function retrieveArgument (string $ className , string $ argumentName , mixed $ defaultValue = null ): array
55
57
{
56
58
$ arguments = $ this ->objectManagerConfig ->getArguments (
57
59
$ this ->objectManagerConfig ->getPreference ($ className )
You can’t perform that action at this time.
0 commit comments