public function getErrors(): array
    {
        $error = [];

        foreach ($this->list as $r) {
            $error[$r->getPropertyPath()] = $r->getMessage();
        }

        return $error;
    }
public function getErrors(): array
    {
        $error = [];

        foreach ($this->list as $r) {
            $error[$r->getPropertyPath()] = $r->getMessage();
        }

        return $error;
    }
public function getErrors ( ) : array { $ error = [ ] ; foreach ( $ this -> list as $ r ) { $ error [ $ r -> getPropertyPath ( ) ] = $ r -> getMessage ( ) ; } return $ error ; }
Gets the list of errors

@return array
Gets the list of errors