Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
23 | public static function build(Acl $acl, EnumType $roleType): iterable |
||
24 | { |
||
25 | yield 'aclConfiguration' => fn () => [ |
||
|
|||
26 | 'name' => 'aclConfiguration', |
||
27 | 'type' => Type::nonNull(Type::listOf(Type::nonNull(_types()->get(AclResourceConfigurationType::class)))), |
||
28 | 'description' => 'User friendly configuration of the ACL', |
||
29 | 'args' => [ |
||
30 | 'roles' => Type::nonNull(Type::listOf(Type::nonNull($roleType))), |
||
31 | ], |
||
32 | 'resolve' => function ($root, array $args) use ($acl): array { |
||
33 | $roles = $args['roles']; |
||
34 | $result = $acl->show(new MultipleRoles($roles)); |
||
35 | |||
36 | return $result; |
||
37 | }, |
||
41 |