ModelNotifiableDirective   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A processModelTypeDirective() 0 5 1
A processModelFieldDirective() 0 6 1
A processModelRelationshipDirective() 0 7 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
       \Formularium\Field $fieldFormularium,
21
        \GraphQL\Language\AST\DirectiveNode $directive
22
    ): void {
23
    }
24
25
    public static function processModelRelationshipDirective(
26
        ModelGenerator $generator,
27
        \GraphQL\Type\Definition\FieldDefinition $field,
28
        \GraphQL\Language\AST\DirectiveNode $directive,
29
        \Formularium\Datatype $datatype = null
30
    ): ?\Formularium\Datatype {
31
        return null;
32
    }
33
}
34