Skip to content

Commit 4a3f5f0

Browse files
committed
Merge pull request #8 from clue/no-bools
Remove boolean filters (dropped from spec v0.3)
2 parents 327eb60 + 5f68473 commit 4a3f5f0

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

src/QueryExpressionFilter.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ private function matchFilter($data, $filter)
2323
{
2424
if ($this->isObject($filter)) {
2525
return $this->matchAnd($data, $filter);
26-
} elseif (is_bool($filter)) {
27-
return $filter;
2826
} else {
2927
throw new DomainException('Invalid filter type');
3028
}

tests/QueryExpressionFilterTest.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -228,20 +228,6 @@ public function testEmptyNotAndNeverMatches()
228228
$this->assertFalse($filter->doesMatch(array('id' => 100)));
229229
}
230230

231-
public function testTrueAlwaysMatches()
232-
{
233-
$filter = new QueryExpressionFilter(true);
234-
235-
$this->assertTrue($filter->doesMatch(array('id' => 100)));
236-
}
237-
238-
public function testFalseNeverMatches()
239-
{
240-
$filter = new QueryExpressionFilter(false);
241-
242-
$this->assertFalse($filter->doesMatch(array('id' => 100)));
243-
}
244-
245231
public function testAttributeNotValue()
246232
{
247233
$filter = new QueryExpressionFilter(array(

0 commit comments

Comments
 (0)