| 1 | <?php |
||
| 10 | final class RouterCacheWarmer implements CacheWarmerInterface |
||
| 11 | { |
||
| 12 | const CACHE_DIR = 'rpc'; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var Router |
||
| 16 | */ |
||
| 17 | private $router; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Constructor. |
||
| 21 | * |
||
| 22 | * @param MethodMatcher $router A Router instance |
||
| 23 | */ |
||
| 24 | 1 | public function __construct(MethodMatcher $router) |
|
| 28 | |||
| 29 | /** |
||
| 30 | * Warms up the cache. |
||
| 31 | * |
||
| 32 | * @param string $cacheDir The cache directory |
||
| 33 | */ |
||
| 34 | public function warmUp($cacheDir) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Checks whether this warmer is optional or not. |
||
| 43 | * |
||
| 44 | * @return bool always true |
||
| 45 | */ |
||
| 46 | 1 | public function isOptional() |
|
| 50 | } |
||
| 51 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.