Completed
Push — master ( 98a062...441031 )
by Ryan
10:10
created

ScaffoldTheme::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php namespace Anomaly\Streams\Platform\Addon\Console\Command;
2
3
use Anomaly\Streams\Platform\Support\Parser;
4
use Illuminate\Filesystem\Filesystem;
5
6
/**
7
 * Class ScaffoldTheme
8
 *
9
 * @link   http://pyrocms.com/
10
 * @author PyroCMS, Inc. <[email protected]>
11
 * @author Ryan Thompson <[email protected]>
12
 */
13
class ScaffoldTheme
14
{
15
16
    /**
17
     * Copy these theme folders.
18
     *
19
     * @var array
20
     */
21
    protected $copy = [
22
        'fonts',
23
        'js',
24
        'scss',
25
        'views',
26
    ];
27
28
    /**
29
     * The addon path.
30
     *
31
     * @var string
32
     */
33
    private $path;
34
35
    /**
36
     * Create a new ScaffoldTheme instance.
37
     *
38
     * @param $path
39
     */
40
    public function __construct($path)
41
    {
42
        $this->path = $path;
43
    }
44
45
    /**
46
     * Handle the command.
47
     *
48
     * @param Parser $parser
0 ignored issues
show
Bug introduced by
There is no parameter named $parser. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
49
     * @param Filesystem $filesystem
50
     */
51
    public function handle(Filesystem $filesystem)
52
    {
53
        foreach ($this->copy as $copy) {
54
            $filesystem->copyDirectory(
55
                base_path('vendor/anomaly/streams-platform/resources/stubs/addons/resources/' . $copy),
56
                "{$this->path}/resources/" . $copy
57
            );
58
        }
59
    }
60
}
61