RefreshThemeCommand::handle()   A
last analyzed

Complexity

Conditions 2
Paths 3

Size

Total Lines 11
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 5
c 1
b 0
f 0
nc 3
nop 0
dl 0
loc 11
rs 10
1
<?php
2
3
namespace Maestriam\Samurai\Console;
4
5
use Exception;
6
7
class RefreshThemeCommand extends BaseCommand
8
{
9
    /**
10
     * {@inheritDoc}
11
     */
12
    protected $signature = 'samurai:refresh';
13
14
    /**
15
     * {@inheritDoc}
16
     */
17
    protected $description = 'Refresh cache and view in Laravel Project.';
18
19
    /**
20
     * {@inheritDoc}
21
     */
22
    protected string $successMessage = 'Cache and views are refreshed.';
23
24
    /**
25
     * {@inheritDoc}
26
     */
27
    protected string $errorMessage = 'Error to refresh project: %s';
28
29
    /**
30
     * Executa o comando de console
31
     *
32
     * @return mixed
33
     */
34
    public function handle()
35
    {            
36
        try {
37
38
            $this->clean();
39
40
            return $this->success();
41
            
42
        } catch (Exception $e) {
43
44
            return $this->failure($e);
45
        }
46
    }
47
}
48