| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 11 | 
| Code Lines | 5 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 6 | 
| CRAP Score | 1 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 17 | 1 | public function __construct(StreamInterface $stream) | |
| 18 |     { | ||
| 19 | // Skip the first 10 bytes | ||
| 20 | 1 | $stream = new LimitStream($stream, -1, 10); | |
| 21 | |||
| 22 | 1 | $resource = StreamWrapper::getResource($stream); | |
| 23 | |||
| 24 | 1 | stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ); | |
| 25 | |||
| 26 | 1 | $this->stream = new Stream($resource); | |
|  | |||
| 27 | 1 | } | |
| 28 | } | ||
| 29 | 
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: