original_string: public function isImage()
      {
          $mime = $this->getMimeType();
  
          // The $image_mimes property contains an array of file extensions and
          // their associated MIME types. We will loop through them and look for
          // the MIME type of the current UploadedFile.
          foreach ($this->image_mimes as $image_mime) {
              if (in_array($mime, (array)$image_mime)) {
                  return true;
              }
          }
  
          return false;
      }
code: public function isImage()
      {
          $mime = $this->getMimeType();
  
          // The $image_mimes property contains an array of file extensions and
          // their associated MIME types. We will loop through them and look for
          // the MIME type of the current UploadedFile.
          foreach ($this->image_mimes as $image_mime) {
              if (in_array($mime, (array)$image_mime)) {
                  return true;
              }
          }
  
          return false;
      }
code_tokens: public function isImage ( ) { $ mime = $ this -> getMimeType ( ) ; // The $image_mimes property contains an array of file extensions and // their associated MIME types. We will loop through them and look for // the MIME type of the current UploadedFile. foreach ( $ this -> image_mimes as $ image_mime ) { if ( in_array ( $ mime , ( array ) $ image_mime ) ) { return true ; } } return false ; }
docstring: Utility method for detecing whether a given file upload is an image.
  
  @return bool
docstring_tokens: Utility method for detecing whether a given file upload is an image .