Parser/Rules.php
public function remove($type, $index = null)
    {
        if ($index === null) {
            unset($this[$type]);
            return;
        }

        if(!isset($this[$type][$index])) {
            throw new NoSuchElementException("There is no rule '$type' type indexed by '$index'.");
        }

        unset($this[$type][$index]);
    }
public function remove($type, $index = null)
    {
        if ($index === null) {
            unset($this[$type]);
            return;
        }

        if(!isset($this[$type][$index])) {
            throw new NoSuchElementException("There is no rule '$type' type indexed by '$index'.");
        }

        unset($this[$type][$index]);
    }
public function remove ( $ type , $ index = null ) { if ( $ index === null ) { unset ( $ this [ $ type ] ) ; return ; } if ( ! isset ( $ this [ $ type ] [ $ index ] ) ) { throw new NoSuchElementException ( "There is no rule '$type' type indexed by '$index'." ) ; } unset ( $ this [ $ type ] [ $ index ] ) ; }
Removes rule of given type and index.

@param string $type
@param mixed  $index

@throws NoSuchElementException
Removes rule of given type and index .