Passed
Push — master ( a41166...4c99b3 )
by Bruno
03:13
created

ModelNotifiableDirective   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 2
c 1
b 0
f 0
dl 0
loc 21
ccs 0
cts 6
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A processModelRelationshipDirective() 0 5 1
A processModelTypeDirective() 0 5 1
A processModelFieldDirective() 0 5 1
1
<?php declare(strict_types=1);
2
3
namespace Modelarium\Laravel\Directives;
4
5
use Modelarium\Laravel\Targets\ModelGenerator;
6
use Modelarium\Laravel\Targets\Interfaces\ModelDirectiveInterface;
7
8
class ModelNotifiableDirective implements ModelDirectiveInterface
9
{
10
    public static function processModelTypeDirective(
11
        ModelGenerator $generator,
12
        \GraphQL\Language\AST\DirectiveNode $directive
13
    ): void {
14
        $generator->traits[] = '\Illuminate\Notifications\Notifiable';
15
    }
16
17
    public static function processModelFieldDirective(
18
        ModelGenerator $generator,
19
        \GraphQL\Type\Definition\FieldDefinition $field,
20
        \GraphQL\Language\AST\DirectiveNode $directive
21
    ): void {
22
    }
23
24
    public function processModelRelationshipDirective(
25
        ModelGenerator $generator,
26
        \GraphQL\Type\Definition\FieldDefinition $field,
27
        \GraphQL\Language\AST\DirectiveNode $directive
28
    ): void {
29
    }
30
}
31