Schema::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 9
ccs 7
cts 7
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;
6
7
/**
8
 * Our API schema.
9
 */
10
class Schema extends \GraphQL\Type\Schema
11
{
12 47
    public function __construct()
13
    {
14 47
        $config = [
15 47
            'query' => fn () => _types()->get(QueryType::class),
16 47
            'mutation' => fn () => _types()->get(MutationType::class),
17 47
            'typeLoader' => fn (string $name) => _types()->loadType($name, 'Application\Model'),
18 47
        ];
19
20 47
        parent::__construct($config);
21
    }
22
}
23