Passed
Pull Request — 1.2 (#558)
by
unknown
09:10
created

Update::publishAssets()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace A17\Twill\Commands;
4
5
use Illuminate\Console\Command;
6
7
class Update extends Command
8
{
9
    protected $signature = 'twill:update';
10
11
    protected $description = 'Publish new updated Twill assets';
12
13
    /**
14
     * Executes the console command.
15
     *
16
     * @return mixed
17
     */
18 1
    public function handle()
19
    {
20 1
        $this->publishAssets();
21 1
        $this->info('You should now also run php artisan migrate to execute any new Twill provided migration.');
22 1
    }
23
24
    /**
25
     * Publishes the package frontend assets.
26
     *
27
     * @return void
28
     */
29 1
    private function publishAssets()
30
    {
31 1
        $this->call('vendor:publish', [
32 1
            '--provider' => 'A17\Twill\TwillServiceProvider',
33
            '--tag' => 'assets',
34
        ]);
35 1
    }
36
}
37