1 | <?php |
||
17 | class Connection extends \hiqdev\hiart\rest\Connection implements ConnectionInterface |
||
18 | { |
||
19 | public $queryBuilderClass = QueryBuilder::class; |
||
20 | |||
21 | public $commandClass = Command::class; |
||
22 | |||
23 | private $app; |
||
24 | |||
25 | public function __construct(Application $app, $config = []) |
||
30 | |||
31 | /** |
||
32 | * @param ResponseInterface $response |
||
33 | * @return string|false error text or false |
||
34 | */ |
||
35 | public function getResponseError(ResponseInterface $response) |
||
50 | |||
51 | /** |
||
52 | * @param ResponseInterface $response |
||
53 | * @return bool |
||
54 | */ |
||
55 | public function isError(ResponseInterface $response) |
||
68 | |||
69 | private function isRawDataEmpty(ResponseInterface $response) |
||
73 | |||
74 | private function getError(ResponseInterface $response) |
||
87 | |||
88 | /** |
||
89 | * Gets auth data from user. |
||
90 | * @return array |
||
91 | */ |
||
92 | public function getAuth() |
||
100 | } |
||
101 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: