original_string: public function getImageInfo($image)
      {
          if ( empty($image) || !file_exists($image))
          {
              throw new \InvalidArgumentException('Image file not found.');
          }
  
          $pathInfo = pathinfo($image);
          $info     = getimagesize($image);
  
          if ( !in_array($pathInfo['extension'], $this->types) )
          {
              throw new \InvalidArgumentException('Unsupported image file extension.');
          }
  
          $info['width']    = $info[0];
          $info['height']   = $info[1];
          $info['ext']      = $info['type'] = $pathInfo['extension'];
          $info['size']     = filesize($image);
          $info['dir']      = $pathInfo['dirname'];
          $info['path']     = str_replace('/', DIRECTORY_SEPARATOR, $image);
          $info['fullname'] = $pathInfo['basename'];
          $info['filename'] = $pathInfo['filename'];
          $info['type']     = ($info['type'] == 'jpg') ? 'jpeg' : $info['type'];
  
          return $info;
      }
code: public function getImageInfo($image)
      {
          if ( empty($image) || !file_exists($image))
          {
              throw new \InvalidArgumentException('Image file not found.');
          }
  
          $pathInfo = pathinfo($image);
          $info     = getimagesize($image);
  
          if ( !in_array($pathInfo['extension'], $this->types) )
          {
              throw new \InvalidArgumentException('Unsupported image file extension.');
          }
  
          $info['width']    = $info[0];
          $info['height']   = $info[1];
          $info['ext']      = $info['type'] = $pathInfo['extension'];
          $info['size']     = filesize($image);
          $info['dir']      = $pathInfo['dirname'];
          $info['path']     = str_replace('/', DIRECTORY_SEPARATOR, $image);
          $info['fullname'] = $pathInfo['basename'];
          $info['filename'] = $pathInfo['filename'];
          $info['type']     = ($info['type'] == 'jpg') ? 'jpeg' : $info['type'];
  
          return $info;
      }
code_tokens: public function getImageInfo ( $ image ) { if ( empty ( $ image ) || ! file_exists ( $ image ) ) { throw new \ InvalidArgumentException ( 'Image file not found.' ) ; } $ pathInfo = pathinfo ( $ image ) ; $ info = getimagesize ( $ image ) ; if ( ! in_array ( $ pathInfo [ 'extension' ] , $ this -> types ) ) { throw new \ InvalidArgumentException ( 'Unsupported image file extension.' ) ; } $ info [ 'width' ] = $ info [ 0 ] ; $ info [ 'height' ] = $ info [ 1 ] ; $ info [ 'ext' ] = $ info [ 'type' ] = $ pathInfo [ 'extension' ] ; $ info [ 'size' ] = filesize ( $ image ) ; $ info [ 'dir' ] = $ pathInfo [ 'dirname' ] ; $ info [ 'path' ] = str_replace ( '/' , DIRECTORY_SEPARATOR , $ image ) ; $ info [ 'fullname' ] = $ pathInfo [ 'basename' ] ; $ info [ 'filename' ] = $ pathInfo [ 'filename' ] ; $ info [ 'type' ] = ( $ info [ 'type' ] == 'jpg' ) ? 'jpeg' : $ info [ 'type' ] ; return $ info ; }
docstring: Get image info array
  
  @param string $image
  @return array
docstring_tokens: Get image info array