Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
50 | protected function writeFile(string $key, string $storage, $stream): void |
||
51 | { |
||
52 | if (!$this->registry->has($storage)) { |
||
53 | throw StorageFailure::unsupported($storage); |
||
54 | } |
||
55 | |||
56 | try { |
||
57 | $result = $this->registry->get($storage)->writeStream($key, $stream); |
||
58 | } catch (Throwable $e) { |
||
59 | throw StorageFailure::invalidWrite($key, $e); |
||
60 | } |
||
61 | |||
62 | if (!$result) { |
||
63 | throw StorageFailure::invalidWrite($key); |
||
64 | } |
||
67 |