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

[WIP] more check and test for filter processors #15 #27

Merged
merged 2 commits into from Oct 18, 2019

Conversation

@kamarton
Copy link
Contributor

@kamarton kamarton commented Oct 11, 2019

Q A
Is bugfix?
New feature?
Breaks BC?
Tests pass? ✔️
Fixed issues #15

->withArrayFilters() add more checks and tests.

src/Reader/Iterable/Processor/Equals.php Outdated Show resolved Hide resolved
src/Reader/Iterable/Processor/GreaterThan.php Outdated Show resolved Hide resolved
src/Reader/Iterable/Processor/GreaterThanOrEqual.php Outdated Show resolved Hide resolved
src/Reader/Iterable/Processor/GroupProcessor.php Outdated Show resolved Hide resolved
src/Reader/Iterable/Processor/GroupProcessor.php Outdated Show resolved Hide resolved
src/Reader/Iterable/Processor/LessThan.php Outdated Show resolved Hide resolved
src/Reader/Iterable/Processor/LessThanOrEqual.php Outdated Show resolved Hide resolved
src/Reader/Iterable/Processor/Like.php Outdated Show resolved Hide resolved
@@ -15,11 +15,17 @@ public function getOperator(): string

public function match(array $item, array $arguments, array $filterProcessors): bool
{
$operation = array_shift($arguments[0]);
if(count($arguments) < 1 || !is_array($arguments[0]) || count($arguments[0]) < 1) {
throw new \RuntimeException('Invalid arguments!!');
Copy link
Member

@samdark samdark Oct 13, 2019

Choose a reason for hiding this comment

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

These three situations deserve separate error messages.

src/Reader/Iterable/Processor/Not.php Outdated Show resolved Hide resolved
@samdark
Copy link
Member

@samdark samdark commented Oct 13, 2019

Good direction overall but some adjustments are needed.

@kamarton kamarton changed the title more check and test for filter processors #15 [WIP] more check and test for filter processors #15 Oct 18, 2019
@samdark samdark merged commit b89b056 into yiisoft:master Oct 18, 2019
2 of 3 checks passed
@samdark
Copy link
Member

@samdark samdark commented Oct 18, 2019

Merged. Thank you!

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

Successfully merging this pull request may close these issues.

None yet

3 participants