Completed
Push — master ( 35afb1...ea1666 )
by David
10s
created

MissingAnnotationException   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 3
dl 0
loc 10
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A missingTypeExceptionToUseSourceField() 0 3 1
A missingTypeException() 0 3 1
1
<?php
2
3
4
namespace TheCodingMachine\GraphQL\Controllers;
5
6
7
class MissingAnnotationException extends \RuntimeException
8
{
9
    public static function missingTypeExceptionToUseSourceField(): self
10
    {
11
        return new self('You cannot use the @SourceField annotation without also adding a @Type annotation.');
12
    }
13
14
    public static function missingTypeException(): self
15
    {
16
        return new self('GraphQL type classes must provide a @Type annotation.');
17
    }
18
}
19