1 | <?php |
||
21 | class RouteLoader implements LoaderInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var RouteCollection |
||
25 | */ |
||
26 | private $routes; |
||
27 | |||
28 | /** |
||
29 | * RouteLoader constructor. |
||
30 | */ |
||
31 | public function __construct() |
||
35 | |||
36 | /** |
||
37 | * @param string $name The name of the route |
||
38 | * @param string $controllerId The controller service ID |
||
39 | * @param string $methodName The controller method name |
||
40 | * @param string $path The path pattern to match |
||
41 | * @param array $defaults An array of default parameter values |
||
42 | * @param array $requirements An array of requirements for parameters (regexes) |
||
43 | * @param array $options An array of options |
||
44 | * @param string $host The host pattern to match |
||
45 | * @param string|array $schemes A required URI scheme or an array of restricted schemes |
||
46 | * @param string|array $methods A required HTTP method or an array of restricted methods |
||
47 | * @param string $condition A condition that should evaluate to true for the route to match |
||
48 | */ |
||
49 | public function addRoute($name, $controllerId, $methodName, $path, array $defaults = [], array $requirements = [], array $options = [], $host = '', $schemes = [], $methods = [], $condition = '') |
||
55 | |||
56 | public function load($resource, $type = null) |
||
60 | |||
61 | public function supports($resource, $type = null) |
||
65 | |||
66 | public function getResolver() |
||
69 | |||
70 | public function setResolver(LoaderResolverInterface $resolver) |
||
73 | } |
||
74 |
This check looks at variables that have been passed in as parameters and are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.