FilesystemHelper   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 34
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __call() 0 4 1
A getName() 0 4 1
1
<?php
2
3
/**
4
 * Aist Filesystem Component (http://mateuszsitek.com/projects/filesystem)
5
 *
6
 * @copyright Copyright (c) 2017 DIGITAL WOLVES LTD (http://digitalwolves.ltd) All rights reserved.
7
 * @license   http://opensource.org/licenses/BSD-3-Clause BSD-3-Clause
8
 */
9
10
namespace Aist\Filesystem\Console\Helper;
11
12
use Symfony\Component\Console\Helper\Helper;
13
use Symfony\Component\Filesystem\Filesystem;
14
15
/**
16
 * Filesystem helper class
17
 */
18
class FilesystemHelper extends Helper
19
{
20
    const NAME = 'filesystemHelper';
21
22
    /** @var Filesystem  */
23
    protected $filesystem;
24
25
    /**
26
     * @param Filesystem $filesystem
27
     */
28
    public function __construct(Filesystem $filesystem)
29
    {
30
        $this->filesystem = $filesystem;
31
    }
32
33
    /**
34
     * @param $method
35
     * @param $args
36
     *
37
     * @return mixed
38
     */
39
    public function __call($method, $args)
40
    {
41
        return call_user_func_array([$this->filesystem, $method], $args);
42
    }
43
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function getName()
48
    {
49
        return self::NAME;
50
    }
51
}
52