| Total Complexity | 3 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | abstract class Constraint |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected const ERROR_NOT_SUPPORTED_MESSAGE = |
||
| 26 | '%s not supported by GraphQL %s specification. Please indicate a more ' . |
||
| 27 | 'modern version of the language specification to enable support for ' . |
||
| 28 | 'this functionality'; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @param NodeInterface $node |
||
| 32 | * @param SpecificationInterface $spec |
||
| 33 | * @return void |
||
| 34 | */ |
||
| 35 | abstract public static function assert(NodeInterface $node, SpecificationInterface $spec): void; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param SpecificationInterface $spec |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | protected static function notSupported(SpecificationInterface $spec): string |
||
| 46 | ]); |
||
| 47 | } |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | public static function getName(): string |
||
| 57 | } |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @param string $fqn |
||
| 61 | * @return string |
||
| 62 | */ |
||
| 63 | protected static function basename(string $fqn): string |
||
| 68 |