original_string: public static function dimensions($input, $type, $size) {
          if (static::file($input)) {
              $input = $input['tmp_name'];
          }
  
          if (!file_exists($input)) {
              return false;
          }
  
          if ($file = getimagesize($input)) {
              $width = $file[0];
              $height = $file[1];
  
              switch ($type) {
                  case 'width':       return ($width == $size);
                  case 'height':      return ($height == $size);
                  case 'maxWidth':    return ($width <= $size);
                  case 'maxHeight':   return ($height <= $size);
                  case 'minWidth':    return ($width >= $size);
                  case 'minHeight':   return ($height >= $size);
              }
          }
  
          return false;
      }
code: public static function dimensions($input, $type, $size) {
          if (static::file($input)) {
              $input = $input['tmp_name'];
          }
  
          if (!file_exists($input)) {
              return false;
          }
  
          if ($file = getimagesize($input)) {
              $width = $file[0];
              $height = $file[1];
  
              switch ($type) {
                  case 'width':       return ($width == $size);
                  case 'height':      return ($height == $size);
                  case 'maxWidth':    return ($width <= $size);
                  case 'maxHeight':   return ($height <= $size);
                  case 'minWidth':    return ($width >= $size);
                  case 'minHeight':   return ($height >= $size);
              }
          }
  
          return false;
      }
code_tokens: public static function dimensions ( $ input , $ type , $ size ) { if ( static :: file ( $ input ) ) { $ input = $ input [ 'tmp_name' ] ; } if ( ! file_exists ( $ input ) ) { return false ; } if ( $ file = getimagesize ( $ input ) ) { $ width = $ file [ 0 ] ; $ height = $ file [ 1 ] ; switch ( $ type ) { case 'width' : return ( $ width == $ size ) ; case 'height' : return ( $ height == $ size ) ; case 'maxWidth' : return ( $ width <= $ size ) ; case 'maxHeight' : return ( $ height <= $ size ) ; case 'minWidth' : return ( $ width >= $ size ) ; case 'minHeight' : return ( $ height >= $ size ) ; } } return false ; }
docstring: Validate an images dimensions.
  
  @param array $input
  @param string $type
  @param int $size
  @return bool
docstring_tokens: Validate an images dimensions .