Completed
Push — master ( 611e0d...3b7232 )
by Kirill
02:21
created

DirectiveDefinition   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 3
dl 0
loc 32
ccs 0
cts 10
cp 0
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 4 1
A isAllowedFor() 0 4 1
A getLocations() 0 4 1
A getLocation() 0 4 1
A hasLocation() 0 4 1
1
<?php
2
/**
3
 * This file is part of Railt package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
declare(strict_types=1);
9
10
namespace Railt\Reflection\Definition;
11
12
use Railt\Reflection\AbstractTypeDefinition;
13
use Railt\Reflection\Contracts\Definition\Dependent\ArgumentDefinition;
14
use Railt\Reflection\Contracts\Definition\Dependent\DirectiveLocation;
15
use Railt\Reflection\Contracts\Definition\DirectiveDefinition as DirectiveDefinitionInterface;
16
use Railt\Reflection\Contracts\Definition\TypeDefinition;
17
use Railt\Reflection\Contracts\Type as TypeInterface;
18
use Railt\Reflection\Definition\Behaviour\HasArguments;
19
use Railt\Reflection\Type;
20
21
/**
22
 * Class DirectiveDefinition
23
 * TODO
24
 */
25
class DirectiveDefinition extends AbstractTypeDefinition implements DirectiveDefinitionInterface
26
{
27
    use HasArguments;
28
29
    /**
30
     * @return TypeInterface
31
     */
32
    public static function getType(): TypeInterface
33
    {
34
        return Type::of(Type::DIRECTIVE);
35
    }
36
37
    public function isAllowedFor(TypeDefinition $definition): bool
38
    {
39
        throw new \LogicException(__METHOD__ . ' not implemented yet');
40
    }
41
42
    public function getLocations(): iterable
43
    {
44
        throw new \LogicException(__METHOD__ . ' not implemented yet');
45
    }
46
47
    public function getLocation(string $name): ?DirectiveLocation
48
    {
49
        throw new \LogicException(__METHOD__ . ' not implemented yet');
50
    }
51
52
    public function hasLocation(string $name): bool
53
    {
54
        throw new \LogicException(__METHOD__ . ' not implemented yet');
55
    }
56
}
57