CopyGitIgnoreFile::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 2
1
<?php namespace Arcanedev\Assets\Pipes\Init;
2
3
use Arcanedev\Assets\Helpers\Stub;
4
use Closure;
5
6
/**
7
 * Class     CopyGitIgnoreFile
8
 *
9
 * @package  Arcanedev\Assets\Pipes\Init
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
class CopyGitIgnoreFile extends AbstractPipe
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
        Stub::make('module/gitignore.stub')
28
            ->save(base_path($passable['path'].'/.gitignore'));
29
30
        return $next($passable);
31
    }
32
}
33