CopyGitIgnoreFile   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 38
ccs 0
cts 10
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handle() 0 7 1
A getStub() 0 4 1
1
<?php namespace Arcanedev\Assets\Pipes\Make;
2
3
use Arcanedev\Assets\Helpers\Stub;
4
use Closure;
5
6
/**
7
 * Class     CopyGitIgnoreFile
8
 *
9
 * @package  Arcanedev\Assets\Pipes\Make
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
abstract class CopyGitIgnoreFile
13
{
14
    /* -----------------------------------------------------------------
15
     |  Main Method
16
     | -----------------------------------------------------------------
17
     */
18
19
    /**
20
     * @param  array     $passable
21
     * @param  \Closure  $next
22
     *
23
     * @return mixed
24
     */
25
    public function handle(array $passable, Closure $next)
26
    {
27
        $this->getStub($passable)
28
             ->save(base_path($passable['path'].'/.gitignore'));
29
30
        return $next($passable);
31
    }
32
33
    /* -----------------------------------------------------------------
34
     |  Other Methods
35
     | -----------------------------------------------------------------
36
     */
37
38
    /**
39
     * Get the stub file.
40
     *
41
     * @param  array  $passable
42
     *
43
     * @return \Arcanedev\Assets\Helpers\Stub
44
     */
45
    protected function getStub(array $passable)
0 ignored issues
show
Unused Code introduced by
The parameter $passable is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
46
    {
47
        return Stub::make("module/gitignore.stub");
48
    }
49
}
50