1 | <?php |
||
5 | class StringHelper { |
||
6 | |||
7 | /** |
||
8 | * Turn a list of machine names into a camel-cased string. |
||
9 | * |
||
10 | * @return string |
||
11 | * A camel-cased concatenation of the input components. |
||
12 | * |
||
13 | * @throws \InvalidArgumentException |
||
14 | * If the provided input does can't be converted to a specification compliant |
||
15 | * string representation for field or type names. |
||
16 | */ |
||
17 | public static function camelCase() { |
||
29 | |||
30 | /** |
||
31 | * Turn a list of machine names into a property-cased string. |
||
32 | * |
||
33 | * @return string |
||
34 | * A camel-cased concatenation of the input components. |
||
35 | */ |
||
36 | public static function propCase() { |
||
40 | |||
41 | /** |
||
42 | * Wraps a type string in brackets declaring it as a list. |
||
43 | * |
||
44 | * @param string $type |
||
45 | * The type to declare as a list. |
||
46 | * |
||
47 | * @return string |
||
48 | * The decorated type string. |
||
49 | */ |
||
50 | public static function listType($type) { |
||
53 | |||
54 | /** |
||
55 | * Appends an exclamation mark to a type string declaring it as non-null. |
||
56 | * |
||
57 | * @param string $type |
||
58 | * The type to declare as non-null. |
||
59 | * |
||
60 | * @return string |
||
61 | * The decorated type string. |
||
62 | */ |
||
63 | public static function nonNullType($type) { |
||
66 | |||
67 | } |