Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
37 | 120 | protected function getTableNameParts(string $name): array |
|
38 | { |
||
39 | 120 | $parts = [$name]; |
|
40 | 120 | preg_match_all('/([^.\[\]]+)|\[([^\[\]]+)]/', $name, $matches); |
|
41 | |||
42 | 120 | if (isset($matches[0]) && !empty($matches[0])) { |
|
43 | 120 | $parts = $matches[0]; |
|
44 | } |
||
45 | |||
46 | 120 | return str_replace(['[', ']'], '', $parts); |
|
47 | } |
||
49 |