@@ -143,7 +143,7 @@ protected function json($data, int $status = 200, array $headers = [], array $co
143143 *
144144 * @final
145145 */
146- protected function file ($ file , string $ fileName = null , string $ disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT ): BinaryFileResponse
146+ protected function file ($ file , ? string $ fileName = null , string $ disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT ): BinaryFileResponse
147147 {
148148 $ response = new BinaryFileResponse ($ file );
149149 $ response ->setContentDisposition ($ disposition , null === $ fileName ? $ response ->getFile ()->getFilename () : $ fileName );
@@ -236,7 +236,7 @@ protected function renderView(string $view, array $parameters = []): string
236236 protected function render (
237237 string $ view ,
238238 array $ parameters = [],
239- Response $ response = null ,
239+ ? Response $ response = null ,
240240 ?int $ responseCode = null
241241 ): Response {
242242 if ($ this ->container ->has ('templating ' )) {
@@ -266,7 +266,7 @@ protected function render(
266266 *
267267 * @final
268268 */
269- protected function stream (string $ view , array $ parameters = [], StreamedResponse $ response = null ): StreamedResponse
269+ protected function stream (string $ view , array $ parameters = [], ? StreamedResponse $ response = null ): StreamedResponse
270270 {
271271 if ($ this ->container ->has ('templating ' )) {
272272 @trigger_error ('Using the "templating" service is deprecated since Symfony 4.3 and will be removed in 5.0; use Twig instead. ' , \E_USER_DEPRECATED );
@@ -304,7 +304,7 @@ protected function stream(string $view, array $parameters = [], StreamedResponse
304304 *
305305 * @final
306306 */
307- protected function createNotFoundException (string $ message = 'Not Found ' , \Throwable $ previous = null ): NotFoundHttpException
307+ protected function createNotFoundException (string $ message = 'Not Found ' , ? \Throwable $ previous = null ): NotFoundHttpException
308308 {
309309 return new NotFoundHttpException ($ message , $ previous );
310310 }
@@ -320,7 +320,7 @@ protected function createNotFoundException(string $message = 'Not Found', \Throw
320320 *
321321 * @final
322322 */
323- protected function createAccessDeniedException (string $ message = 'Access Denied. ' , \Throwable $ previous = null ): AccessDeniedException
323+ protected function createAccessDeniedException (string $ message = 'Access Denied. ' , ? \Throwable $ previous = null ): AccessDeniedException
324324 {
325325 if (!class_exists (AccessDeniedException::class)) {
326326 throw new \LogicException ('You can not use the "createAccessDeniedException" method if the Security component is not available. Try running "composer require symfony/security-bundle". ' );
0 commit comments