Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | 6 | public function __construct($origin, $url, IO\IOInterface $io) |
|
20 | { |
||
21 | 6 | parent::__construct($origin, $url, $io); |
|
22 | 6 | if ($this->password === 'x-oauth-basic') { |
|
23 | 1 | $this->query['access_token'] = $this->username; |
|
24 | // forbid basic-auth |
||
25 | 1 | $this->username = $this->password = null; |
|
26 | 1 | } |
|
27 | 6 | } |
|
28 | |||
44 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: