| 1 | <?php |
||
| 6 | class Utils |
||
| 7 | { |
||
| 8 | /** |
||
| 9 | * Create short name (without namespaces). |
||
| 10 | * |
||
| 11 | * @param string $name |
||
| 12 | * |
||
| 13 | * @return string |
||
| 14 | */ |
||
| 15 | public static function shortName(string $name): string |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Inject values to array at given index. |
||
| 27 | * |
||
| 28 | * @param array $stmts |
||
| 29 | * @param int $index |
||
| 30 | * @param array $child |
||
| 31 | * |
||
| 32 | * @return array |
||
| 33 | */ |
||
| 34 | public static function injectValues(array $stmts, int $index, array $child): array |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Remove trailing digits in the given name. |
||
| 44 | * |
||
| 45 | * @param string $name |
||
| 46 | * @param int $number |
||
| 47 | * |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | public static function trimTrailingDigits(string $name, int $number): string |
||
| 59 | } |