Skip to content

Commit 0edf6db

Browse files
committed
Fixed value type for iteratorFilter
1 parent 2a80886 commit 0edf6db

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/IteratorFilter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ private function evalString(Row $singleRow): bool
112112
* @return static
113113
* @desc Add a single string comparison to filter.
114114
*/
115-
public function addRelation(string $name, int $relation, array|string $value): static
115+
public function addRelation(string $name, int $relation, mixed $value): static
116116
{
117117
$this->filters[] = [" and ", $name, $relation, $value];
118118
return $this;
@@ -125,7 +125,7 @@ public function addRelation(string $name, int $relation, array|string $value): s
125125
* @return static
126126
* @desc Add a single string comparison to filter. This comparison use the OR operator.
127127
*/
128-
public function addRelationOr(string $name, int $relation, array|string $value): static
128+
public function addRelationOr(string $name, int $relation, mixed $value): static
129129
{
130130
$this->filters[] = [" or ", $name, $relation, $value];
131131
return $this;

src/IteratorFilterFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ abstract class IteratorFilterFormatter
1414
* @param array $param
1515
* @return string
1616
*/
17-
abstract public function getRelation(string $name, string $relation, array|string $value, array &$param): string;
17+
abstract public function getRelation(string $name, string $relation, mixed $value, array &$param): string;
1818

1919
/**
2020
* Get formatted field

src/IteratorFilterXPathFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function format(array $filters, string $tableName = null, array &$params
2424
/**
2525
* @inheritDoc
2626
*/
27-
public function getRelation(string $name, string $relation, array|string $value, array &$param): string
27+
public function getRelation(string $name, string $relation, mixed $value, array &$param): string
2828
{
2929
$str = is_numeric($value) ? "" : "'";
3030
$field = "field[@name='" . $name . "'] ";

0 commit comments

Comments
 (0)