HasFilesystem   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 30
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getFilesystem() 0 3 1
A setFilesystem() 0 5 1
1
<?php
2
3
namespace Nip\Filesystem\File;
4
5
use League\Flysystem\FilesystemInterface;
0 ignored issues
show
Bug introduced by
The type League\Flysystem\FilesystemInterface was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Nip\Filesystem\FileDisk;
7
8
/**
9
 * Trait HasFilesystem
10
 * @package Nip\Filesystem\File
11
 */
12
trait HasFilesystem
13
{
14
15
    /**
16
     * @var FilesystemInterface|FileDisk
17
     */
18
    protected $filesystem;
19
20
    /**
21
     * Set the Filesystem object.
22
     *
23
     * @param FilesystemInterface $filesystem
24
     *
25
     * @return $this
26
     */
27
    public function setFilesystem(FilesystemInterface $filesystem)
28
    {
29
        $this->filesystem = $filesystem;
30
31
        return $this;
32
    }
33
34
    /**
35
     * Retrieve the Filesystem object.
36
     *
37
     * @return FilesystemInterface|FileDisk
38
     */
39
    public function getFilesystem()
40
    {
41
        return $this->filesystem;
42
    }
43
44
}