1 | <?php |
||
28 | class Controller |
||
29 | { |
||
30 | /** |
||
31 | * @var CloudManagerInterface |
||
32 | */ |
||
33 | private $cloudManager; |
||
34 | |||
35 | /** |
||
36 | * @var EventDispatcherInterface |
||
37 | */ |
||
38 | private $eventDispatcher; |
||
39 | |||
40 | /** |
||
41 | * @param CloudManagerInterface $cloudManager |
||
42 | * @param EventDispatcherInterface $eventDispatcher |
||
43 | */ |
||
44 | 10 | public function __construct(CloudManagerInterface $cloudManager, EventDispatcherInterface $eventDispatcher) |
|
49 | |||
50 | /** |
||
51 | * Sign a set of given url parameters and return them as a JSON object. |
||
52 | * |
||
53 | * Specials keys are <em>method</em> and <em>path</em>. <em>method</em> is |
||
54 | * the http method and <em>path</em> the url part of the api request for |
||
55 | * which the signature is generated. The default <em>method</em> if not |
||
56 | * given is <em>GET</em>, the default <em>path</em> is <em>/videos.json</em>. |
||
57 | * All remaining url parameters are treated as parameters for the api |
||
58 | * request. |
||
59 | * |
||
60 | * @param string $cloud Cloud to use for performing API requests |
||
61 | * @param Request $request The current request |
||
62 | * |
||
63 | * @return JsonResponse The response |
||
64 | */ |
||
65 | 2 | public function signAction($cloud, Request $request) |
|
90 | |||
91 | /** |
||
92 | * Authorize a file upload. |
||
93 | * |
||
94 | * The name of the file to upload and its size are passed as POST parameters. |
||
95 | * The response contains a JSON encoded object. It includes a property |
||
96 | * upload_url to which the caller should send its video file. |
||
97 | * |
||
98 | * @param string $cloud Cloud to use for performing API requests |
||
99 | * @param Request $request The current request |
||
100 | * |
||
101 | * @return JsonResponse The response |
||
102 | */ |
||
103 | 1 | public function authoriseUploadAction($cloud, Request $request) |
|
117 | |||
118 | /** |
||
119 | * Endpoint for notification requests. |
||
120 | * |
||
121 | * @param Request $request The current request |
||
122 | * |
||
123 | * @return Response An empty response with status code 200 |
||
124 | */ |
||
125 | 6 | public function notifyAction(Request $request) |
|
141 | } |
||
142 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: