Passed
Push — master ( c520ec...7f55a3 )
by Gabriel
04:29
created

HasFilesystem   A

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;
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
}