| 1 | <?php |
||
| 10 | class ZendDb2Adapter implements AdapterInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var \Zend\Db\Adapter\Adapter |
||
| 14 | */ |
||
| 15 | protected $zendAdapter; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var ZendDb2Connection |
||
| 19 | */ |
||
| 20 | protected $connection; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Constructor. |
||
| 24 | * |
||
| 25 | * @param \Zend\Db\Adapter\Adapter $zendAdapter |
||
| 26 | */ |
||
| 27 | 6 | public function __construct(\Zend\Db\Adapter\Adapter $zendAdapter) |
|
| 32 | |||
| 33 | /** |
||
| 34 | * {@inheritdoc} |
||
| 35 | */ |
||
| 36 | 1 | public function quoteValue($value) |
|
| 40 | |||
| 41 | /** |
||
| 42 | * {@inheritdoc} |
||
| 43 | */ |
||
| 44 | 3 | public function query($query, $resultsetType = Resultset::TYPE_ARRAY) |
|
| 65 | |||
| 66 | /** |
||
| 67 | * {@inheritdoc} |
||
| 68 | * |
||
| 69 | * @return ZendDb2Connection |
||
| 70 | */ |
||
| 71 | 1 | public function getConnection() |
|
| 75 | } |
||
| 76 |
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: