Passed
Push — master ( 95d3b3...37ba81 )
by Adrien
07:02
created

AllPermissionsType   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 16
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 14 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Api\Output;
6
7
use GraphQL\Type\Definition\ObjectType;
8
9
class AllPermissionsType extends ObjectType
10
{
11 1
    public function __construct()
12
    {
13
        $config = [
14 1
            'name' => 'AllPermissions',
15 1
            'description' => 'Describe permissions for current user',
16
            'fields' => [
17
                'crud' => [
18 1
                    'type' => self::nonNull(_types()->get(CrudPermissionsListType::class)),
19 1
                    'description' => 'Permissions for object creation',
20
                ],
21
            ],
22
        ];
23
24 1
        parent::__construct($config);
25 1
    }
26
}
27