original_string: protected function get_imageinfo_from_path($path) {
          $imageinfo = getimagesize($path);
  
          $image = array(
                  'width'     => $imageinfo[0],
                  'height'    => $imageinfo[1],
                  'mimetype'  => image_type_to_mime_type($imageinfo[2]),
              );
          if (empty($image['width']) or empty($image['height']) or empty($image['mimetype'])) {
              // GD can not parse it, sorry.
              return false;
          }
          return $image;
      }
code: protected function get_imageinfo_from_path($path) {
          $imageinfo = getimagesize($path);
  
          $image = array(
                  'width'     => $imageinfo[0],
                  'height'    => $imageinfo[1],
                  'mimetype'  => image_type_to_mime_type($imageinfo[2]),
              );
          if (empty($image['width']) or empty($image['height']) or empty($image['mimetype'])) {
              // GD can not parse it, sorry.
              return false;
          }
          return $image;
      }
code_tokens: protected function get_imageinfo_from_path ( $ path ) { $ imageinfo = getimagesize ( $ path ) ; $ image = array ( 'width' => $ imageinfo [ 0 ] , 'height' => $ imageinfo [ 1 ] , 'mimetype' => image_type_to_mime_type ( $ imageinfo [ 2 ] ) , ) ; if ( empty ( $ image [ 'width' ] ) or empty ( $ image [ 'height' ] ) or empty ( $ image [ 'mimetype' ] ) ) { // GD can not parse it, sorry. return false ; } return $ image ; }
docstring: Returns image information relating to the specified path or URL.
  
  @param string $path The path to pass to getimagesize.
  @return array Containing width, height, and mimetype.
docstring_tokens: Returns image information relating to the specified path or URL .