protected function normalizeValidationRuleSourceDataFromConfig(array $rules)
    {
        // Remove entries to be ignored and excluded
        $filteredRules = array_filter($rules, function ($rule, $key) {

            return  false !== $rule
                &&  ! empty($rule)
                &&  ! (is_string($rule) && is_numeric($key));

        }, ARRAY_FILTER_USE_BOTH);

        return $this->normalizeValidationRuleSourceData($filteredRules);
    }
protected function normalizeValidationRuleSourceDataFromConfig(array $rules)
    {
        // Remove entries to be ignored and excluded
        $filteredRules = array_filter($rules, function ($rule, $key) {

            return  false !== $rule
                &&  ! empty($rule)
                &&  ! (is_string($rule) && is_numeric($key));

        }, ARRAY_FILTER_USE_BOTH);

        return $this->normalizeValidationRuleSourceData($filteredRules);
    }
protected function normalizeValidationRuleSourceDataFromConfig ( array $ rules ) { // Remove entries to be ignored and excluded $ filteredRules = array_filter ( $ rules , function ( $ rule , $ key ) { return false !== $ rule && ! empty ( $ rule ) && ! ( is_string ( $ rule ) && is_numeric ( $ key ) ) ; } , ARRAY_FILTER_USE_BOTH ) ; return $ this -> normalizeValidationRuleSourceData ( $ filteredRules ) ; }
Normalizes custom configured rules data to include only specified rules.

This leaves out rules nullified to exclude them, as well as rules
marked to be included/kept as generated by default.

@param array $rules
@return ValidationRuleDataInterface[]
Normalizes custom configured rules data to include only specified rules .