public function getFailures(bool $skipEmptyValues = false) : array
    {
        if ($this->failures) {
            if ($skipEmptyValues) {
                $net = [];
                foreach ($this->failures as $key => $val) {
                    if ($val) {
                        $net[$key] = $val;
                    }
                }
                return $net;
            }
            return $this->failures;
        }
        return [];
    }
public function getFailures(bool $skipEmptyValues = false) : array
    {
        if ($this->failures) {
            if ($skipEmptyValues) {
                $net = [];
                foreach ($this->failures as $key => $val) {
                    if ($val) {
                        $net[$key] = $val;
                    }
                }
                return $net;
            }
            return $this->failures;
        }
        return [];
    }
public function getFailures ( bool $ skipEmptyValues = false ) : array { if ( $ this -> failures ) { if ( $ skipEmptyValues ) { $ net = [ ] ; foreach ( $ this -> failures as $ key => $ val ) { if ( $ val ) { $ net [ $ key ] = $ val ; } } return $ net ; } return $ this -> failures ; } return [ ] ; }
Get list of validation failures.

Skipping empty values may for instance be relevant when keys are column
names (correlating to HTTP request properties) and values are messages
meant for a HTTP response header; and some messages are empty because
dupe message (two columns involved in failure).

@param bool $skipEmptyValues
True: skip items whose bucket value is empty.

@return array
Get list of validation failures .