| Conditions | 4 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 29 | 12 | protected function readNextLine() |
|
| 30 | { |
||
| 31 | 12 | if (!$this->hasNext()) { |
|
| 32 | 12 | return; |
|
| 33 | } |
||
| 34 | |||
| 35 | 12 | $buffer = fgets($this->handle, 4096); |
|
| 36 | 12 | $this->currentBuffer = false; |
|
|
|
|||
| 37 | |||
| 38 | 12 | if (($buffer !== false) && (trim($buffer) != "")) { |
|
| 39 | 12 | $this->current++; |
|
| 40 | 12 | $this->currentBuffer = $buffer; |
|
| 41 | 12 | } else { |
|
| 42 | 12 | $this->readNextLine(); |
|
| 43 | } |
||
| 44 | 12 | } |
|
| 45 | |||
| 114 |
This check looks for assignments to scalar types that may be of the wrong type.
To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.