| 1 | <?php |
||
| 9 | final class CachedFinder implements Finder |
||
| 10 | { |
||
| 11 | /** @var Finder */ |
||
| 12 | private $delegate; |
||
| 13 | /** @var EntityDataCacheInterface */ |
||
| 14 | private $cache; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * CachedFinder constructor. |
||
| 18 | * |
||
| 19 | * @param Finder $delegate |
||
| 20 | * @param EntityDataCacheInterface $cache |
||
| 21 | */ |
||
| 22 | public function __construct(Finder $delegate, EntityDataCacheInterface $cache) |
||
| 27 | |||
| 28 | /** {@inheritdoc} */ |
||
| 29 | public function find(array $identifier) |
||
| 41 | |||
| 42 | /** {@inheritdoc} */ |
||
| 43 | public function getClient() |
||
| 47 | |||
| 48 | /** {@inheritdoc} */ |
||
| 49 | public function getMetadata() |
||
| 53 | } |
||
| 54 |
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: