module/FzyCommon/src/FzyCommon/Service/Update/Base.php
protected function normalizeMessages($messages)
    {
        $queue = array();

        foreach ($messages as $key => $value) {
            if (is_array($value) && count($value)) {
                $queue[$key] = (array) array_pop($value);
            } else {
                $queue[$key] = (array) $value;
            }
        }

        return $queue;
    }
protected function normalizeMessages($messages)
    {
        $queue = array();

        foreach ($messages as $key => $value) {
            if (is_array($value) && count($value)) {
                $queue[$key] = (array) array_pop($value);
            } else {
                $queue[$key] = (array) $value;
            }
        }

        return $queue;
    }
This is here to format standard form validation errors, so that
we can use customized error messaging instead of the 1 message only
practice from using annotations.

@param $messages
@return array