1 | <?php |
||
27 | trait ConversionTrait |
||
28 | { |
||
29 | /** |
||
30 | * Convert case of a string. |
||
31 | * |
||
32 | * Supported $toCase are |
||
33 | * |
||
34 | * 'PASCAL': PascalCase |
||
35 | * 'CAMEL' : camelCase |
||
36 | * 'SNAKE' : snake_case |
||
37 | * |
||
38 | * @param string $string |
||
39 | * @param string $toCase |
||
40 | * @return string |
||
41 | * @access public |
||
42 | * @static |
||
43 | */ |
||
44 | public static function convertCase( |
||
62 | |||
63 | /** |
||
64 | * Has string contain a suffix ? |
||
65 | * |
||
66 | * @param string $string |
||
67 | * @param string $suffix |
||
68 | * @return bool |
||
69 | * @access public |
||
70 | * @static |
||
71 | */ |
||
72 | public static function hasSuffix( |
||
82 | |||
83 | /** |
||
84 | * Remove a suffix from a string |
||
85 | * |
||
86 | * @param string $string |
||
87 | * @param string $suffix |
||
88 | * @return string |
||
89 | * @access public |
||
90 | * @static |
||
91 | */ |
||
92 | public static function removeSuffix( |
||
101 | } |
||
102 |
As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.