Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

OnkelTem
Copy link

See #20

Copy link
Owner

@romaricdrigon romaricdrigon left a 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)
Copy link
Owner

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) ?

Copy link
Owner

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 = '')
Copy link
Owner

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()
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants