| Total Complexity | 2 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | abstract class Utils |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * Get the GraphQL type name for an output type from the PHP class |
||
| 16 | * |
||
| 17 | * @param string $className |
||
| 18 | * |
||
| 19 | * @return string |
||
| 20 | */ |
||
| 21 | 65 | public static function getTypeName(string $className): string |
|
| 22 | { |
||
| 23 | 65 | $parts = explode('\\', $className); |
|
| 24 | |||
| 25 | 65 | return end($parts); |
|
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Get the GraphQL type name for a Filter type from the PHP class |
||
| 30 | * |
||
| 31 | * @param string $className |
||
| 32 | * @param LeafType $type |
||
| 33 | * |
||
| 34 | * @return string |
||
| 35 | */ |
||
| 36 | 29 | public static function getOperatorTypeName(string $className, LeafType $type): string |
|
| 39 | } |
||
| 40 | } |
||
| 41 |