slevomat /
csob-gateway
| 1 | <?php declare(strict_types = 1); |
||
| 2 | |||
| 3 | namespace SlevomatCsobGateway\Api\Driver; |
||
| 4 | |||
| 5 | use RuntimeException; |
||
| 6 | use SlevomatCsobGateway\Api\ApiClientDriverException; |
||
| 7 | |||
| 8 | class CurlDriverException extends RuntimeException implements ApiClientDriverException |
||
| 9 | { |
||
| 10 | |||
| 11 | /** @var mixed */ |
||
| 12 | private $info; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @param resource $handle |
||
| 16 | */ |
||
| 17 | 1 | public function __construct($handle) |
|
| 18 | { |
||
| 19 | 1 | parent::__construct('Request error: ' . curl_error($handle)); |
|
| 20 | |||
| 21 | 1 | $this->code = curl_errno($handle); |
|
| 22 | 1 | $this->info = curl_getinfo($handle); |
|
|
0 ignored issues
–
show
|
|||
| 23 | 1 | } |
|
| 24 | /** |
||
| 25 | * @see curl_getinfo() |
||
| 26 | * |
||
| 27 | * @return mixed |
||
| 28 | */ |
||
| 29 | 1 | public function getInfo() |
|
| 30 | { |
||
| 31 | 1 | return $this->info; |
|
| 32 | } |
||
| 33 | |||
| 34 | } |
||
| 35 |
This check looks for function or method calls that always return null and whose return value is assigned to a variable.
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.