| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | 11 | public function buildReturning($returning) |
|
| 14 | { |
||
| 15 | 11 | if (empty($returning)) { |
|
| 16 | 8 | return ''; // not applicable |
|
| 17 | } |
||
| 18 | |||
| 19 | 3 | $cols = []; |
|
| 20 | 3 | foreach ($returning as $col) { |
|
| 21 | 3 | $cols[] = $this->quoter->quoteNamesIn($col); |
|
|
|
|||
| 22 | 3 | } |
|
| 23 | 3 | return PHP_EOL . 'RETURNING' . $this->indentCsv($cols); |
|
| 24 | } |
||
| 25 | } |
||
| 26 |
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: