for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Guzzle transport for yii2-hiart
*
* @link https://github.com/hiqdev/yii2-hiart-guzzle
* @package yii2-hiart-guzzle
* @license BSD-3-Clause
* @copyright Copyright (c) 2017, HiQDev (http://hiqdev.com/)
*/
namespace hiqdev\hiart\guzzle;
use GuzzleHttp\Client as Handler;
use GuzzleHttp\Psr7\Request as Worker;
* Guzzle request implementation.
* @author Andrii Vasyliev <[email protected]>
class Request extends \hiqdev\hiart\proxy\Request
{
protected $responseClass = Response::class;
protected $handlerClass = Handler::class;
protected function createWorker()
return new Worker($this->method, $this->uri, $this->headers, $this->body, $this->version);
$this->method
array
string
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:
function acceptsInteger($int) { } $x = '123'; // string "123" // Instead of acceptsInteger($x); // we recommend to use acceptsInteger((integer) $x);
}
protected function prepareHandlerConfig($config)
return array_merge([
'base_uri' => $this->getDb()->getBaseUri(),
], $config);
public static function isSupported()
return true;
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: