1 | <?php |
||
16 | class SerializedRouteCollection extends RouteCollection |
||
17 | { |
||
18 | use FileCacheTrait; |
||
19 | |||
20 | const CACHE_FILE = 'routes'; |
||
21 | |||
22 | /** |
||
23 | * @var string[] |
||
24 | */ |
||
25 | private $serializedRoutes = null; |
||
26 | |||
27 | /** |
||
28 | * @var Route[] |
||
29 | */ |
||
30 | 6 | private $cache = []; |
|
31 | |||
32 | 6 | /** |
|
33 | 6 | * @param string $name |
|
34 | * @return Route |
||
35 | */ |
||
36 | public function get($name) |
||
50 | |||
51 | public function all() |
||
57 | 2 | ||
58 | /** |
||
59 | 2 | * Gets the current RouteCollection as an Iterator that includes all routes. |
|
60 | * |
||
61 | 2 | * It implements \IteratorAggregate. |
|
62 | * |
||
63 | * @see all() |
||
64 | * |
||
65 | * @return ArrayIterator An \ArrayIterator object for iterating over routes |
||
66 | */ |
||
67 | public function getIterator() |
||
73 | 2 | ||
74 | /** |
||
75 | 2 | * Gets the number of Routes in this collection. |
|
76 | * |
||
77 | 2 | * @return int The number of routes |
|
78 | */ |
||
79 | public function count() |
||
85 | 1 | ||
86 | /** |
||
87 | 1 | * @param string $name |
|
88 | * @param Route $route |
||
89 | */ |
||
90 | 1 | public function add($name, Route $route) |
|
94 | |||
95 | /** |
||
96 | 1 | * @param array|string $name |
|
97 | */ |
||
98 | 1 | public function remove($name) |
|
103 | |||
104 | private function initAll() |
||
110 | |||
111 | private function loadFromCache() |
||
117 | } |
||
118 |
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..