ModelSkipDirective::processSeedFieldDirective()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 0
nc 1
nop 3
dl 0
loc 5
ccs 0
cts 1
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Modelarium\Laravel\Directives;
4
5
use Modelarium\Exception\SkipGenerationException;
6
use Modelarium\Laravel\Targets\EventGenerator;
7
use Modelarium\Laravel\Targets\FactoryGenerator;
8
use Modelarium\Laravel\Targets\Interfaces\EventDirectiveInterface;
9
use Modelarium\Laravel\Targets\Interfaces\FactoryDirectiveInterface;
10
use Modelarium\Laravel\Targets\ModelGenerator;
11
use Modelarium\Laravel\Targets\Interfaces\ModelDirectiveInterface;
12
use Modelarium\Laravel\Targets\Interfaces\PolicyDirectiveInterface;
13
use Modelarium\Laravel\Targets\Interfaces\SeedDirectiveInterface;
14
use Modelarium\Laravel\Targets\SeedGenerator;
15
16
class ModelSkipDirective implements ModelDirectiveInterface, SeedDirectiveInterface, FactoryDirectiveInterface
17
{
18
    public static function processModelTypeDirective(
19
        ModelGenerator $generator,
20
        \GraphQL\Language\AST\DirectiveNode $directive
21
    ): void {
22
        throw new SkipGenerationException();
23
    }
24
25
    public static function processModelFieldDirective(
26
        ModelGenerator $generator,
27
        \GraphQL\Type\Definition\FieldDefinition $field,
28
        \Formularium\Field $fieldFormularium,
29
        \GraphQL\Language\AST\DirectiveNode $directive
30
    ): void {
31
    }
32
33
    public static function processModelRelationshipDirective(
34
        ModelGenerator $generator,
35
        \GraphQL\Type\Definition\FieldDefinition $field,
36
        \GraphQL\Language\AST\DirectiveNode $directive,
37
        \Formularium\Datatype $datatype = null
38
    ): ?\Formularium\Datatype {
39
        return null;
40
    }
41
42
    public static function processSeedTypeDirective(
43
        SeedGenerator $generator,
44
        \GraphQL\Language\AST\DirectiveNode $directive
45
    ): void {
46
        throw new SkipGenerationException();
47
    }
48
49
    public static function processSeedFieldDirective(
50
        SeedGenerator $generator,
51
        \GraphQL\Type\Definition\FieldDefinition $field,
52
        \GraphQL\Language\AST\DirectiveNode $directive
53
    ): void {
54
    }
55
56
    public static function processFactoryTypeDirective(
57
        FactoryGenerator $generator,
58
        \GraphQL\Language\AST\DirectiveNode $directive
59
    ): void {
60
        throw new SkipGenerationException();
61
    }
62
63
    public static function processFactoryFieldDirective(
64
        FactoryGenerator $generator,
65
        \GraphQL\Type\Definition\FieldDefinition $field,
66
        \GraphQL\Language\AST\DirectiveNode $directive
67
    ): void {
68
    }
69
}
70