Passed
Push — master ( 16b30f...f79ab4 )
by Radu
01:14
created

ShipmentsCommand::test()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 10
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
namespace ParcelValue\ApiClient\Domain\Shipments;
3
4
use WebServCo\Framework\CliResponse;
5
6
final class ShipmentsCommand extends \ParcelValue\ApiClient\AbstractController
7
{
8
    protected $logger;
9
    protected $curlBrowser;
10
11
    public function __construct()
12
    {
13
        parent::__construct();
14
15
        $this->repository = new ShipmentsRepository($this->outputLoader);
16
17
        $this->logger = new \WebServCo\Framework\FileLogger(
18
            __FUNCTION__,
19
            sprintf('%svar/log/', $this->data('path/project')),
0 ignored issues
show
Bug introduced by
It seems like $this->data('path/project') can also be of type false; however, parameter $args of sprintf() 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

19
            sprintf('%svar/log/', /** @scrutinizer ignore-type */ $this->data('path/project')),
Loading history...
20
            $this->request()
21
        );
22
        $this->curlBrowser = new \WebServCo\Framework\CurlBrowser($this->logger);
23
    }
24
25
    public function test($clientId, $clientKey, $serverKey)
0 ignored issues
show
Unused Code introduced by
The parameter $clientKey is not used and could be removed. ( Ignorable by Annotation )

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

25
    public function test($clientId, /** @scrutinizer ignore-unused */ $clientKey, $serverKey)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $clientId is not used and could be removed. ( Ignorable by Annotation )

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

25
    public function test(/** @scrutinizer ignore-unused */ $clientId, $clientKey, $serverKey)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $serverKey is not used and could be removed. ( Ignorable by Annotation )

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

25
    public function test($clientId, $clientKey, /** @scrutinizer ignore-unused */ $serverKey)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
26
    {
27
        var_dump($this->config()->get('app'));
0 ignored issues
show
Security Debugging Code introduced by
var_dump($this->config()->get('app')) looks like debug code. Are you sure you do not want to remove it?
Loading history...
28
29
        // XXX move project to github
30
        //XXX ? move documentation to parcelvalue/api
31
        //problem: since it's a public app, can't use PV FW
32
33
        //$this->outputCli('', true);
34
        return new CliResponse('', true);
35
    }
36
}
37