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

cleanup, refactoring, splitted validators, tweaks #3

Merged
merged 3 commits into from
Jan 3, 2012

Conversation

digitalkaoz
Copy link
Contributor

hey justin,

i refactored the whole library so its done in a cleaner way.
the main refactoring was the split of validators into separate smaller classes
they all use a common interface
all tests are still passing

*/
public function isValid()
{
return !!!$this->getErrors();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

return !$this->getErrors();

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yap, fixed

@igorw
Copy link
Contributor

igorw commented Jan 2, 2012

It's a bit confusing to have JsonSchema\Validator and JsonSchema\Validator\Validator (I'm surprised this doesn't cause conflicts). I think it would make more sense to rename the latter to Constraint (or something else) everywhere.

@digitalkaoz
Copy link
Contributor Author

yeah i didnt found a better name, what about BaseValidator?

@digitalkaoz
Copy link
Contributor Author

renamed it to Constraint

@igorw
Copy link
Contributor

igorw commented Jan 2, 2012

👍

@justinrainbow
Copy link
Collaborator

Thanks @digitalkaoz - these changes look great

justinrainbow added a commit that referenced this pull request Jan 3, 2012
cleanup, refactoring, splitted validators, tweaks
@justinrainbow justinrainbow merged commit 05ff6d8 into jsonrainbow:master Jan 3, 2012
@igorw
Copy link
Contributor

igorw commented Jan 3, 2012

You guys are fast! Great stuff! :)

Now we can add JSON-schema validation to composer!

erayd added a commit to erayd/json-schema that referenced this pull request Oct 5, 2017
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

5 participants