| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 29 | public function __construct($content) |
||
| 30 | { |
||
| 31 | $stream = fopen('php://memory', 'rw+'); |
||
| 32 | if (\is_resource($stream)) { |
||
| 33 | fputs($stream, $content); |
||
| 34 | $this->stream = $stream; |
||
| 35 | return; |
||
| 36 | } |
||
| 37 | |||
| 38 | throw new InvalidArgumentException( |
||
| 39 | "Could not create stream from content: $content" |
||
| 40 | ); |
||
| 43 |