1 | <?php |
||
29 | class TypeService |
||
|
|||
30 | { |
||
31 | public const TYPE_CALLABLE = 'callable'; |
||
32 | |||
33 | public const TYPE_GRAPHQL_TYPE = 'graphql_type'; |
||
34 | |||
35 | public const TYPE_OBJECT_TYPE = 'object_type'; |
||
36 | |||
37 | public const TYPE_ARRAY_OF_OBJECT_TYPES = 'array_of_object_types'; |
||
38 | |||
39 | 2 | public const TYPE_OBJECT_INPUT_TYPE = 'object_input_type'; |
|
40 | |||
41 | 2 | public const TYPE_LIST = 'list'; |
|
42 | 1 | ||
43 | 1 | public const TYPE_BOOLEAN = TypeMap::TYPE_BOOLEAN; |
|
44 | |||
45 | 2 | public const TYPE_STRING = TypeMap::TYPE_STRING; |
|
46 | 1 | ||
47 | 2 | public const TYPE_ARRAY = 'array'; |
|
48 | 1 | ||
49 | public const TYPE_ARRAY_OF_FIELDS_CONFIG = 'array_of_fields'; |
||
50 | |||
51 | 1 | public const TYPE_ARRAY_OF_INPUT_FIELDS = 'array_of_inputs'; |
|
52 | |||
53 | public const TYPE_ENUM_VALUES = 'array_of_values'; |
||
54 | |||
55 | public const TYPE_ARRAY_OF_INTERFACES = 'array_of_interfaces'; |
||
56 | |||
57 | public const TYPE_ANY = 'any'; |
||
58 | 2 | ||
59 | public const TYPE_ANY_OBJECT = 'any_object'; |
||
60 | 2 | ||
61 | 1 | public const TYPE_ANY_INPUT = 'any_input'; |
|
62 | |||
63 | public static function resolveNamedType($object) |
||
79 | |||
80 | 122 | /** |
|
81 | * @param AbstractType|mixed $type |
||
82 | 122 | * |
|
83 | 106 | * @return bool |
|
84 | */ |
||
85 | public static function isInterface($type) |
||
93 | |||
94 | /** |
||
95 | * @param AbstractType|mixed $type |
||
96 | * |
||
97 | * @return bool |
||
98 | */ |
||
99 | 72 | public static function isAbstractType($type) |
|
107 | |||
108 | 6 | public static function isScalarType($type) |
|
116 | 4 | ||
117 | public static function isGraphQLType($type) |
||
121 | |||
122 | 2 | public static function isLeafType($type) |
|
126 | |||
127 | 10 | public static function isObjectType($type) |
|
131 | 10 | ||
132 | 10 | /** |
|
133 | 10 | * @param AbstractType|mixed $type |
|
134 | 1 | * |
|
135 | * @return bool |
||
136 | 10 | */ |
|
137 | 1 | public static function isInputType($type) |
|
150 | |||
151 | 10 | public static function isInputObjectType($type) |
|
155 | |||
156 | 10 | public static function getPropertyValue($data, $path) |
|
178 | |||
179 | protected static function classify($text) |
||
191 | } |
||
192 |
This check examines a number of code elements and verifies that they conform to the given naming conventions.
You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.