Completed
Push — master ( 048bf8...346c21 )
by Leo
03:28
created

MockHttpClient::getResponseContent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
3
namespace leocata\M1\Tests\Mock;
4
5
use leocata\M1\HttpClient;
6
use leocata\M1\HttpClientAuthorization;
7
8
class MockHttpClient extends HttpClient
9
{
10
    private $client;
11
12
    /**
13
     * MockHttpClient constructor.
14
     * @param HttpClientAuthorization $auth
15
     */
16
    public function __construct(HttpClientAuthorization $auth)
17
    {
18
        $this->client = parent::__construct($auth);
0 ignored issues
show
Bug introduced by
Are you sure the assignment to $this->client is correct as parent::__construct($auth) targeting leocata\M1\HttpClient::__construct() seems to always return null.

This check looks for function or method calls that always return null and whose return value is assigned to a variable.

class A
{
    function getObject()
    {
        return null;
    }

}

$a = new A();
$object = $a->getObject();

The method getObject() can return nothing but null, so it makes no sense to assign that value to a variable.

The reason is most likely that a function or method is imcomplete or has been reduced for debug purposes.

Loading history...
19
    }
20
21
    public function getResponseContent($request)
22
    {
23
        return parent::getResponseContent($request);
24
    }
25
26
}
27