| Conditions | 5 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 5 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 69 | 34 | public function read() |
|
| 70 | { |
||
| 71 | 34 | if (!$this->eof) { |
|
| 72 | 34 | if ($this->minSize < 0 || $this->length <= $this->minSize) { |
|
| 73 | 34 | $next = fread($this->stream, $this->readLength); |
|
| 74 | 34 | if (strlen($next) > 0) { |
|
| 75 | 32 | $this->contents .= $next; |
|
| 76 | 32 | $this->length += strlen($next); |
|
| 77 | 32 | return true; |
|
| 78 | } else { |
||
| 79 | 31 | $this->eof = true; |
|
| 80 | } |
||
| 81 | 31 | } |
|
| 82 | 32 | } |
|
| 83 | 32 | return false; |
|
| 84 | } |
||
| 85 | |||
| 137 |