CopyYarnRcFile::handle()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 4
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
use Illuminate\Support\Facades\File;
6
7
/**
8
 * Class     CopyYarnRcFile
9
 *
10
 * @package  Arcanedev\Assets\Pipes\Init
11
 * @author   ARCANEDEV <[email protected]>
12
 */
13
class CopyYarnRcFile extends AbstractPipe
14
{
15
    /* -----------------------------------------------------------------
16
     |  Main Method
17
     | -----------------------------------------------------------------
18
     */
19
20
    /**
21
     * @param  array    $passable
22
     * @param  Closure  $next
23
     *
24
     * @return mixed
25
     */
26
    public function handle(array $passable, Closure $next)
27
    {
28
        File::copy(Stub::path('init/yarnrc.stub'), base_path('.yarnrc'));
29
30
        return $next($passable);
31
    }
32
}
33