Completed
Push — master ( 7ec8b3...6c2ef1 )
by David
28s
created

InvalidTypesInUnionException::notObjectType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
4
namespace TheCodingMachine\GraphQL\Controllers\Types;
5
6
7
use TheCodingMachine\GraphQL\Controllers\Mappers\CannotMapTypeExceptionInterface;
8
9
class InvalidTypesInUnionException extends \InvalidArgumentException implements CannotMapTypeExceptionInterface
10
{
11
    public static function notObjectType(): self
12
    {
13
        throw new self('A Union type can only contain objects. Scalars, lists, etc... are not allowed.');
14
    }
15
}
16