Domain/DomainUtil.php
protected static function getMapErrors(ConstraintViolationListInterface $errors)
    {
        $maps = [];
        $size = $errors->count();

        for ($i = 0; $i < $size; ++$i) {
            $root = $errors->get($i)->getRoot();

            if (\is_object($root)) {
                $maps[spl_object_hash($errors->get($i)->getRoot())] = $errors->get($i);
            } else {
                $maps[] = $errors->get($i);
            }
        }

        return $maps;
    }
protected static function getMapErrors(ConstraintViolationListInterface $errors)
    {
        $maps = [];
        $size = $errors->count();

        for ($i = 0; $i < $size; ++$i) {
            $root = $errors->get($i)->getRoot();

            if (\is_object($root)) {
                $maps[spl_object_hash($errors->get($i)->getRoot())] = $errors->get($i);
            } else {
                $maps[] = $errors->get($i);
            }
        }

        return $maps;
    }
protected static function getMapErrors ( ConstraintViolationListInterface $ errors ) { $ maps = [ ] ; $ size = $ errors -> count ( ) ; for ( $ i = 0 ; $ i < $ size ; ++ $ i ) { $ root = $ errors -> get ( $ i ) -> getRoot ( ) ; if ( \ is_object ( $ root ) ) { $ maps [ spl_object_hash ( $ errors -> get ( $ i ) -> getRoot ( ) ) ] = $ errors -> get ( $ i ) ; } else { $ maps [ ] = $ errors -> get ( $ i ) ; } } return $ maps ; }
Get the map of object hash and constraint violation list.

@param ConstraintViolationListInterface $errors

@return array The map of object hash and constraint violation list
Get the map of object hash and constraint violation list .