Conditions | 5 |
Paths | 9 |
Total Lines | 20 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 14 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
46 | 27 | public function parseSQL() |
|
47 | { |
||
48 | 27 | $references = $this->manager->all(); |
|
49 | |||
50 | 27 | foreach ($references as &$value) { |
|
51 | 19 | if (is_string($value)) { |
|
52 | 1 | $value = "\"" . $value ."\""; |
|
53 | 1 | } |
|
54 | |||
55 | 19 | if ($value instanceof AbstractTable) { |
|
56 | 18 | $value = $value->getAliasOrName(); |
|
57 | 18 | } |
|
58 | |||
59 | 19 | if ($value instanceof QueryComponentInterface) { |
|
60 | 1 | $value = $value->buildSQL(); |
|
61 | 1 | } |
|
62 | 27 | } |
|
63 | |||
64 | 27 | return str_replace(array_keys($references), array_values($references), $this->rawSQL); |
|
65 | } |
||
66 | } |