[TASK] Add return type declaration to FileDumpController::dumpAction 74/58574/2
authorBenjamin Franzke <bfr@qbus.de>
Wed, 3 Oct 2018 20:42:28 +0000 (22:42 +0200)
committerBenni Mack <benni@typo3.org>
Thu, 4 Oct 2018 17:18:21 +0000 (19:18 +0200)
For historical reasons FileDumpController::dumpAction was allowed to
return null. It didn't specify a nullable return type declaration because
it was not yed decided whether v9 will require php 7.2 or not.
With https://review.typo3.org/55585 FileDumpController was adapted to
return a PSR-7 Response but missed to update the function signature.
The nullable annotation is therefore removed now and the explicit
return type declaration is added.

Change-Id: I10e2cc60ab8e1f023c1beb6cf467bee1800971c8
Releases: master
Resolves: #86564
Reviewed-on: https://review.typo3.org/58574
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/Controller/FileDumpController.php

index a2ab3d4..0868ea4 100644 (file)
@@ -31,14 +31,14 @@ class FileDumpController
      * Main method to dump a file
      *
      * @param ServerRequestInterface $request
-     * @return ResponseInterface|null
+     * @return ResponseInterface
      *
      * @throws \InvalidArgumentException
      * @throws \RuntimeException
      * @throws \TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException
      * @throws \UnexpectedValueException
      */
-    public function dumpAction(ServerRequestInterface $request)
+    public function dumpAction(ServerRequestInterface $request): ResponseInterface
     {
         $parameters = ['eID' => 'dumpFile'];
         $t = $this->getGetOrPost($request, 't');