Completed
Push — master ( d63719...95bf49 )
by Hong
02:43
created

FilesystemAwareTrait::isFilesystemReadable()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 11
rs 9.4285
cc 2
eloc 7
nc 2
nop 0
1
<?php
2
/**
3
 * Phossa Project
4
 *
5
 * PHP version 5.4
6
 *
7
 * @category  Library
8
 * @package   Phossa2\Storage
9
 * @copyright Copyright (c) 2016 phossa.com
10
 * @license   http://mit-license.org/ MIT License
11
 * @link      http://www.phossa.com/
12
 */
13
/*# declare(strict_types=1); */
14
15
namespace Phossa2\Storage\Traits;
16
17
use Phossa2\Storage\Interfaces\FilesystemInterface;
18
use Phossa2\Storage\Interfaces\FilesystemAwareInterface;
19
20
/**
21
 * FilesystemAwareTrait
22
 *
23
 * @package Phossa2\Storage
24
 * @author  Hong Zhang <[email protected]>
25
 * @see     FilesystemAwareInterface
26
 * @version 2.0.0
27
 * @since   2.0.0 added
28
 */
29
trait FilesystemAwareTrait
30
{
31
    /**
32
     * @var    FilesystemInterface
33
     * @access protected
34
     */
35
    protected $filesystem;
36
37
    /**
38
     * {@inheritDoc}
39
     */
40
    public function setFilesystem(FilesystemInterface $filesystem)
41
    {
42
        $this->filesystem = $filesystem;
43
        return $this;
44
    }
45
46
    /**
47
     * {@inheritDoc}
48
     */
49
    public function getFilesystem()/*# : FilesystemInterface */
50
    {
51
        return $this->filesystem;
52
    }
53
}
54