Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
35 | 20 | public function parseSQL() |
|
36 | { |
||
37 | 20 | $references = $this->manager->all(); |
|
38 | |||
39 | 20 | foreach ($references as &$value) { |
|
40 | 12 | if ($value instanceof AbstractTable) { |
|
41 | 12 | $value = $value->getAliasOrName(); |
|
42 | 12 | } |
|
43 | 20 | } |
|
44 | |||
45 | 20 | return str_replace(array_keys($references), array_values($references), $this->rawSQL); |
|
46 | } |
||
47 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: