Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | public function get(): string |
||
28 | { |
||
29 | $cacheDir = $this->appMeta->tmpDir . self::CACHE_DIRNAME; |
||
30 | if (! is_writable($cacheDir) && ! @mkdir($cacheDir)) { |
||
31 | // @codeCoverageIgnoreStart |
||
32 | throw new DirectoryNotWritableException($cacheDir); |
||
33 | // @codeCoverageIgnoreEnd |
||
34 | } |
||
35 | |||
36 | return $cacheDir; |
||
|
|||
37 | } |
||
39 |
In the issue above, the returned value is violating the contract defined by the mentioned interface.
Let's take a look at an example: