-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #20: Enhance error reporting #21
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your work, I added some comments. If you need help with the tests, I can assist once I get what the code is doing :)
|
||
public function __construct($node_path, $message) | ||
public function __construct($node_path, $messages, $paths) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure of why we need to pass an array of messages? The code is much less visible and I'm not sure current($messages)
will always return what we expect. What about having $message
(string) and an extra parameter $previousMessages
(array) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it looks like there's a small indentation glitch just in front of the constructor.
/** | ||
* @throws Exception\NodeValidatorException | ||
*/ | ||
public function validateNode($name, $type, $node, $data, $path = '') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation glitch again.
return $this->messages; | ||
} | ||
|
||
public function getReport() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm not sure to understand what getReport()
is giving? As it will become part of MetaYaml API, there should be a test over it.
See #20