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