GlobalPermissionsType::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 12
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 8
c 0
b 0
f 0
dl 0
loc 14
ccs 12
cts 12
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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 GlobalPermissionsType extends ObjectType
10
{
11 1
    public function __construct()
12
    {
13 1
        $config = [
14 1
            'name' => 'GlobalPermissions',
15 1
            'description' => 'Describe global permissions for current user',
16 1
            'fields' => [
17 1
                'create' => [
18 1
                    'type' => self::nonNull(self::boolean()),
19 1
                    'description' => 'Whether the current logged in user can create',
20 1
                ],
21 1
            ],
22 1
        ];
23
24 1
        parent::__construct($config);
25
    }
26
}
27