diff -u b/core/lib/Drupal/Core/Controller/ExceptionController.php b/core/lib/Drupal/Core/Controller/ExceptionController.php --- b/core/lib/Drupal/Core/Controller/ExceptionController.php +++ b/core/lib/Drupal/Core/Controller/ExceptionController.php @@ -67,6 +67,9 @@ * The flattened exception. * @param \Symfony\Component\HttpFoundation\Request $request * The request object that triggered this exception. + * + * @return \Symfony\Component\HttpFoundation\Response + * A response object to be sent to the server. */ public function on405Html(FlattenException $exception, Request $request) { return new Response('Method Not Allowed', 405); @@ -79,6 +82,9 @@ * The flattened exception. * @param \Symfony\Component\HttpFoundation\Request $request * The request object that triggered this exception. + * + * @return \Symfony\Component\HttpFoundation\Response + * A response object to be sent to the server. */ public function on403Html(FlattenException $exception, Request $request) { $system_path = $request->attributes->get('_system_path'); @@ -134,6 +140,9 @@ * The flattened exception. * @param \Symfony\Component\HttpFoundation\Request $request * The request object that triggered this exception. + * + * @return \Symfony\Component\HttpFoundation\Response + * A response object to be sent to the server. */ public function on404Html(FlattenException $exception, Request $request) { watchdog('page not found', check_plain($request->attributes->get('_system_path')), NULL, WATCHDOG_WARNING); @@ -206,6 +215,9 @@ * Metadata about the exception that was thrown. * @param \Symfony\Component\HttpFoundation\Request $request * The request object that triggered this exception. + * + * @return \Symfony\Component\HttpFoundation\Response + * A response object to be sent to the server. */ public function on500Html(FlattenException $exception, Request $request) { $error = $this->decodeException($exception); @@ -274,6 +286,9 @@ * The flattened exception. * @param \Symfony\Component\HttpFoundation\Request $request * The request object that triggered this exception. + * + * @return \Symfony\Component\HttpFoundation\JsonResponse + * A JSON response object to be sent to the server. */ public function on403Json(FlattenException $exception, Request $request) { $response = new JsonResponse(); @@ -288,6 +303,9 @@ * The flattened exception. * @param \Symfony\Component\HttpFoundation\Request $request * The request object that triggered this exception. + * + * @return \Symfony\Component\HttpFoundation\JsonResponse + * A JSON response object to be sent to the server. */ public function on404Json(FlattenException $exception, Request $request) { $response = new JsonResponse(); @@ -302,6 +320,9 @@ * The flattened exception. * @param \Symfony\Component\HttpFoundation\Request $request * The request object that triggered this exception. + * + * @return \Symfony\Component\HttpFoundation\JsonResponse + * A JSON response object to be sent to the server. */ public function on405Json(FlattenException $exception, Request $request) { $response = new JsonResponse(); @@ -318,7 +339,9 @@ * * @param \Symfony\Component\Debug\Exception\FlattenException $exception * The flattened exception + * * @return array + * The exception */ protected function decodeException(FlattenException $exception) { $message = $exception->getMessage(); @@ -373,7 +396,7 @@ * @param $backtrace * A standard PHP backtrace. * - * @return + * @return array * An associative array with keys 'file', 'line' and 'function'. */ protected function getLastCaller($backtrace) {