original_string: public static function getFileSafe(
          string $uploadField,
          Request $request
      ) {
          if (!$request) {
              return null;
          }
  
          $uploadedFile = $request->file($uploadField);
  
          //check type because request file method, may returns UploadedFile, array or null
          if (!is_a($uploadedFile, UploadedFile::class)) {
              return null;
          }
  
          return $uploadedFile;
      }
code: public static function getFileSafe(
          string $uploadField,
          Request $request
      ) {
          if (!$request) {
              return null;
          }
  
          $uploadedFile = $request->file($uploadField);
  
          //check type because request file method, may returns UploadedFile, array or null
          if (!is_a($uploadedFile, UploadedFile::class)) {
              return null;
          }
  
          return $uploadedFile;
      }
code_tokens: public static function getFileSafe ( string $ uploadField , Request $ request ) { if ( ! $ request ) { return null ; } $ uploadedFile = $ request -> file ( $ uploadField ) ; //check type because request file method, may returns UploadedFile, array or null if ( ! is_a ( $ uploadedFile , UploadedFile :: class ) ) { return null ; } return $ uploadedFile ; }
docstring: Return File in passed request if ok, otherwise return null
  @param string $uploadField
  @param Request $request
  @return null|UploadedFile
docstring_tokens: Return File in passed request if ok otherwise return null