| Total Complexity | 5 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class Flysystem implements StoreInterface |
||
| 10 | { |
||
| 11 | protected $filesystem; |
||
| 12 | |||
| 13 | public function __construct(Filesystem $filesystem) |
||
| 14 | { |
||
| 15 | $this->filesystem = $filesystem; |
||
| 16 | } |
||
| 17 | |||
| 18 | public function put($source, $storagePath) |
||
| 19 | { |
||
| 20 | $fh = fopen($source, 'r'); |
||
| 21 | if ($fh === false) { |
||
| 22 | throw new \Omeka\File\Exception\RuntimeException(sprintf('Failed to open "%s"', $source)); |
||
|
|
|||
| 23 | } |
||
| 24 | |||
| 25 | $config = ['visibility' => Visibility::PUBLIC]; |
||
| 26 | $this->filesystem->writeStream($storagePath, $fh, $config); |
||
| 27 | fclose($fh); |
||
| 28 | } |
||
| 29 | |||
| 30 | public function delete($storagePath) |
||
| 33 | } |
||
| 34 | |||
| 35 | public function getUri($storagePath) |
||
| 38 | } |
||
| 39 | } |
||
| 40 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths