original_string: private function getExtension(UploadedFile $file): ?string
      {
          $originalName = $file->getClientOriginalName();
  
          if ($extension = pathinfo($originalName, PATHINFO_EXTENSION)) {
              return strtolower($extension);
          }
  
          if ($extension = $file->guessExtension()) {
              return strtolower($extension);
          }
  
          return null;
      }
code: private function getExtension(UploadedFile $file): ?string
      {
          $originalName = $file->getClientOriginalName();
  
          if ($extension = pathinfo($originalName, PATHINFO_EXTENSION)) {
              return strtolower($extension);
          }
  
          if ($extension = $file->guessExtension()) {
              return strtolower($extension);
          }
  
          return null;
      }
code_tokens: private function getExtension ( UploadedFile $ file ) : ? string { $ originalName = $ file -> getClientOriginalName ( ) ; if ( $ extension = pathinfo ( $ originalName , PATHINFO_EXTENSION ) ) { return strtolower ( $ extension ) ; } if ( $ extension = $ file -> guessExtension ( ) ) { return strtolower ( $ extension ) ; } return null ; }
docstring: Guess the extension of the given file.
  
  @param UploadedFile $file
  
  @return string|null
docstring_tokens: Guess the extension of the given file .