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