1 | <?php |
||
15 | class Callback extends AbstractRoute |
||
16 | { |
||
17 | /** @var callable The actual callback this route holds */ |
||
18 | protected $callback; |
||
19 | |||
20 | /** @var array String argument parameters from the Request */ |
||
21 | public $arguments; |
||
22 | |||
23 | /** @var ReflectionFunctionAbstract The reflection for the callback */ |
||
24 | protected $reflection; |
||
25 | |||
26 | /** |
||
27 | * @param string $method The HTTP method (GET, POST, etc) |
||
28 | * @param string $pattern The URI pattern for this route |
||
29 | * @param callable $callback The callback this route holds |
||
30 | * @param array $arguments Additional arguments for this callback |
||
31 | */ |
||
32 | 31 | public function __construct( |
|
42 | |||
43 | /** |
||
44 | * Returns an appropriate Reflection for any callable object |
||
45 | * |
||
46 | * @return ReflectionFunctionAbstract The returned reflection object |
||
47 | */ |
||
48 | 10 | public function getCallbackReflection() |
|
56 | |||
57 | /** |
||
58 | * Gets the reflection for a specific method. For callables, the reflection |
||
59 | * is always the same. This follows the AbstractRoute implementation |
||
60 | * |
||
61 | * @param string $method The irrelevant HTTP method for this implementation |
||
62 | * |
||
63 | * @return ReflectionFunctionAbstract The returned reflection object |
||
64 | */ |
||
65 | 10 | public function getReflection($method) |
|
73 | |||
74 | /** |
||
75 | * Runs the callback when this route is matched with params |
||
76 | * |
||
77 | * @param string $method The irrelevant HTTP method for this implementation |
||
78 | * @param array $params An array of params for this request |
||
79 | * |
||
80 | * @see Respect\Rest\Request::$params |
||
81 | * |
||
82 | * @return mixed Whatever the callback returns |
||
83 | */ |
||
84 | 17 | public function runTarget($method, &$params) |
|
91 | } |
||
92 |
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..