1 | <?php declare(strict_types=1); |
||
25 | trait CacheTrait { |
||
26 | |||
27 | /** |
||
28 | * @var Aviat\Banker\Pool |
||
29 | */ |
||
30 | protected $cache; |
||
31 | |||
32 | /** |
||
33 | * Inject the cache object |
||
34 | * |
||
35 | * @param Pool $cache |
||
36 | * @return $this |
||
37 | */ |
||
38 | public function setCache(Pool $cache): self |
||
43 | |||
44 | /** |
||
45 | * Get the cache object if it exists |
||
46 | * |
||
47 | * @return Pool |
||
48 | */ |
||
49 | public function getCache() |
||
53 | |||
54 | /** |
||
55 | * Generate a hash as a cache key from the current method call |
||
56 | * |
||
57 | * @param object $object |
||
58 | * @param string $method |
||
59 | * @param array $args |
||
60 | * @return string |
||
61 | */ |
||
62 | public function getHashForMethodCall($object, string $method, array $args = []): string |
||
73 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..