original_string: protected function file($file, string $fileName = null, string $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT): BinaryFileResponse
      {
          $response = new BinaryFileResponse($file);
          $response->setContentDisposition($disposition, null === $fileName ? $response->getFile()->getFilename() : $fileName);
  
          return $response;
      }
code: protected function file($file, string $fileName = null, string $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT): BinaryFileResponse
      {
          $response = new BinaryFileResponse($file);
          $response->setContentDisposition($disposition, null === $fileName ? $response->getFile()->getFilename() : $fileName);
  
          return $response;
      }
code_tokens: protected function file ( $ file , string $ fileName = null , string $ disposition = ResponseHeaderBag :: DISPOSITION_ATTACHMENT ) : BinaryFileResponse { $ response = new BinaryFileResponse ( $ file ) ; $ response -> setContentDisposition ( $ disposition , null === $ fileName ? $ response -> getFile ( ) -> getFilename ( ) : $ fileName ) ; return $ response ; }
docstring: Returns a BinaryFileResponse object with original or customized file name and disposition header.
  
  @param \SplFileInfo|string $file File object or path to file to be sent as response
  
  @final
docstring_tokens: Returns a BinaryFileResponse object with original or customized file name and disposition header .