Passed
Push — master ( 0658f3...f968a7 )
by y
02:18
created

AsanaGet::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 2
rs 10
1
<?php
2
3
namespace Helix\Asana\Api\Laravel\Command;
4
5
use Helix\Asana\Api\Laravel\Facade\Asana;
6
use Illuminate\Console\Command;
7
8
final class AsanaGet extends Command {
9
10
    protected $description = 'Calls HTTP GET on an Asana endpoint.';
11
12
    protected $signature = 'asana:get {path=users/me}';
13
14
    public function handle () {
15
        Asana::getApi()->get(ltrim($this->argument('path'), '/'));
1 ignored issue
show
Bug introduced by
It seems like $this->argument('path') can also be of type string[]; however, parameter $str of ltrim() does only seem to accept string, maybe add an additional type check? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-type  annotation

15
        Asana::getApi()->get(ltrim(/** @scrutinizer ignore-type */ $this->argument('path'), '/'));
Loading history...
16
    }
17
18
}