Passed
Pull Request — 2.x (#597)
by Antonio Carlos
05:31
created

Update   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 9
c 2
b 0
f 0
dl 0
loc 28
ccs 0
cts 7
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A publishAssets() 0 6 1
A handle() 0 4 1
1
<?php
2
3
namespace A17\Twill\Commands;
4
5
class Update extends Command
6
{
7
    protected $signature = 'twill:update';
8
9
    protected $description = 'Publish new updated Twill assets';
10
11
    /**
12
     * Executes the console command.
13
     *
14
     * @return mixed
15
     */
16
    public function handle()
17
    {
18
        $this->publishAssets();
19
        $this->call('cache:clear');
20
    }
21
22
    /**
23
     * Publishes the package frontend assets.
24
     *
25
     * @return void
26
     */
27
    private function publishAssets()
28
    {
29
        $this->call('vendor:publish', [
30
            '--provider' => 'A17\Twill\TwillServiceProvider',
31
            '--tag' => 'assets',
32
            '--force' => true,
33
        ]);
34
    }
35
}
36