public function clearRules(int $crud = NULL)
    {
        if ($crud == NULL) {
            $this->rules = [];
            return true;
        }

        $ruleSet = [];
        foreach ($this->rules as $rule) {
            if (!$rule->crud & $crud) {
                $ruleSet[] = $rule;
            }
        }
        $this->rules = $ruleSet;
        return true;
    }
public function clearRules(int $crud = NULL)
    {
        if ($crud == NULL) {
            $this->rules = [];
            return true;
        }

        $ruleSet = [];
        foreach ($this->rules as $rule) {
            if (!$rule->crud & $crud) {
                $ruleSet[] = $rule;
            }
        }
        $this->rules = $ruleSet;
        return true;
    }
public function clearRules ( int $ crud = NULL ) { if ( $ crud == NULL ) { $ this -> rules = [ ] ; return true ; } $ ruleSet = [ ] ; foreach ( $ this -> rules as $ rule ) { if ( ! $ rule -> crud & $ crud ) { $ ruleSet [ ] = $ rule ; } } $ this -> rules = $ ruleSet ; return true ; }
clear all rules of particular mode
If no mode is supplied, all rules are wiped

@param int|NULL $crud
@return bool
clear all rules of particular mode If no mode is supplied all rules are wiped