Completed
Push — master ( 6c2ef1...d70f56 )
by David
15s queued 10s
created

MissingAnnotationException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A missingTypeExceptionToUseSourceField() 0 3 1
A missingTypeException() 0 3 1
A missingExtendTypeException() 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
    public static function missingExtendTypeException(): self
20
    {
21
        return new self('Expected a @ExtendType annotation.');
22
    }
23
}
24