hiqdev /
yii2-hiart
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * ActiveRecord for API |
||
| 4 | * |
||
| 5 | * @link https://github.com/hiqdev/yii2-hiart |
||
| 6 | * @package yii2-hiart |
||
| 7 | * @license BSD-3-Clause |
||
| 8 | * @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/) |
||
| 9 | */ |
||
| 10 | |||
| 11 | namespace hiqdev\hiart\proxy; |
||
| 12 | |||
| 13 | use GuzzleHttp\Exception\BadResponseException; |
||
|
0 ignored issues
–
show
|
|||
| 14 | |||
| 15 | abstract class Request extends \hiqdev\hiart\AbstractRequest |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var object |
||
| 19 | */ |
||
| 20 | protected $worker; |
||
| 21 | |||
| 22 | abstract protected function createWorker(); |
||
| 23 | |||
| 24 | public function send($options = []) |
||
| 25 | { |
||
| 26 | try { |
||
| 27 | $responseWorker = $this->getHandler()->send($this->getWorker(), $options); |
||
| 28 | } catch (BadResponseException $exception) { |
||
| 29 | $responseWorker = $exception->getResponse(); |
||
| 30 | } |
||
| 31 | |||
| 32 | return new $this->responseClass($this, $responseWorker); |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return object Worker |
||
| 37 | */ |
||
| 38 | public function getWorker() |
||
| 39 | { |
||
| 40 | if ($this->worker === null) { |
||
| 41 | $this->build(); |
||
| 42 | $this->worker = $this->createWorker(); |
||
| 43 | } |
||
| 44 | |||
| 45 | return $this->worker; |
||
| 46 | } |
||
| 47 | } |
||
| 48 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths