Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 2.0185 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
36 | 205 | public function getTableNameParts(string $name): array |
|
37 | { |
||
38 | 205 | if (preg_match_all('/([^.\[\]]+)|\[([^\[\]]+)]/', $name, $matches)) { |
|
39 | 205 | $parts = array_slice($matches[0], -4, 4); |
|
40 | } else { |
||
41 | $parts = [$name]; |
||
42 | } |
||
43 | |||
44 | 205 | return array_map(function ($part) { |
|
45 | 205 | return $this->unquoteSimpleTableName($part); |
|
46 | }, $parts); |
||
47 | } |
||
49 |