Skip to content

[Validator] CardScheme improvements #6450

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

Closed
wants to merge 1 commit into from
Closed

[Validator] CardScheme improvements #6450

wants to merge 1 commit into from

Conversation

Sgoettschkes
Copy link
Contributor

Bug fix: yes
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -

$schemes = array_flip($constraint->schemes);
} else {
$schemes = array($constraint->schemes => 0);
}
Copy link
Member

Choose a reason for hiding this comment

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

$schemes = array_flip((array) $constraint->schemes); would be shorter

@Sgoettschkes
Copy link
Contributor Author

True @stof! I changed this.

->method('addViolation');

$this->validator->validate($number, new CardScheme(array('schemes' => $schemes)));
}
Copy link
Member

Choose a reason for hiding this comment

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

The code of the test is exactly the same than the previous one. Simply merge both data providers together

@stloyd
Copy link
Contributor

stloyd commented Jan 7, 2013

@Sgoettschkes Could you please squash those commits and give "better" message?

i.e. [Validator] Fix CardSchemeValidator & extend tests

@Sgoettschkes
Copy link
Contributor Author

Done.

@fabpot
Copy link
Member

fabpot commented Jan 7, 2013

Closing in favor of #6583

@fabpot fabpot closed this Jan 7, 2013
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.

4 participants