| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2.0078 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | 2 | public function set(string $content): bool |
|
| 29 | { |
||
| 30 | 2 | $this->clear(); |
|
| 31 | 2 | $resource = fopen('php://temp', 'rb+'); |
|
| 32 | 2 | if (false === $resource) { |
|
| 33 | // @codeCoverageIgnoreStart |
||
| 34 | return false; |
||
| 35 | } |
||
| 36 | // @codeCoverageIgnoreEnd |
||
| 37 | 2 | fwrite($resource, $content); |
|
| 38 | 2 | $this->resource = $resource; |
|
| 39 | 2 | return true; |
|
| 40 | } |
||
| 60 |