PushCommand   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 41
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A handle() 0 3 1
A __construct() 0 5 1
1
<?php
2
3
namespace Eliurkis\laravelcdn\Commands;
4
5
use Illuminate\Console\Command;
0 ignored issues
show
Bug introduced by
The type Illuminate\Console\Command was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Eliurkis\laravelcdn\Contracts\CdnInterface;
7
8
/**
9
 * Class PushCommand.
10
 *
11
 * @category Command
12
 *
13
 * @author   Mahmoud Zalt <[email protected]>
14
 * @author   Raul Ruiz <[email protected]>
15
 * @author   Eliurkis Diaz <[email protected]>
16
 */
17
class PushCommand extends Command
18
{
19
    /**
20
     * The console command name.
21
     *
22
     * @var string
23
     */
24
    protected $signature = 'cdn:push';
25
26
    /**
27
     * The console command description.
28
     *
29
     * @var string
30
     */
31
    protected $description = 'Push assets to CDN';
32
33
    /**
34
     * an instance of the main Cdn class.
35
     *
36
     * @var Vinelab\Cdn\Cdn
0 ignored issues
show
Bug introduced by
The type Eliurkis\laravelcdn\Commands\Vinelab\Cdn\Cdn was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
37
     */
38
    protected $cdn;
39
40
    /**
41
     * @param CdnInterface $cdn
42
     */
43
    public function __construct(CdnInterface $cdn)
44
    {
45
        $this->cdn = $cdn;
0 ignored issues
show
Documentation Bug introduced by
It seems like $cdn of type Eliurkis\laravelcdn\Contracts\CdnInterface is incompatible with the declared type Eliurkis\laravelcdn\Commands\Vinelab\Cdn\Cdn of property $cdn.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
46
47
        parent::__construct();
48
    }
49
50
    /**
51
     * Execute the console command.
52
     *
53
     * @return mixed
54
     */
55
    public function handle()
56
    {
57
        $this->cdn->push();
58
    }
59
}
60