Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
34 | private function setBatch($response) |
||
35 | { |
||
36 | $this->isComplete = $response['t'] === ResponseType::SUCCESS_SEQUENCE; |
||
|
|||
37 | $this->currentIndex = 0; |
||
38 | $this->currentSize = \count($response['r']); |
||
39 | $this->currentData = array(); |
||
40 | foreach ($response['r'] as $row) { |
||
41 | $this->currentData[] = $datum = $row; |
||
42 | } |
||
43 | } |
||
44 | |||
85 |
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: