Skip to content

Commit db6191e

Browse files
authored
Feature boolean value (#375)
Feature boolean value in SimpleCondition::class.
1 parent 63b3c81 commit db6191e

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

src/QueryBuilder/Conditions/Builder/SimpleConditionBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function build(SimpleConditionInterface $expression, array &$params = [])
3131
{
3232
$operator = $expression->getOperator();
3333
$column = $expression->getColumn();
34+
/** @var mixed $value */
3435
$value = $expression->getValue();
3536

3637
if ($column instanceof ExpressionInterface) {

src/QueryBuilder/Conditions/Interface/SimpleConditionInterface.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44

55
namespace Yiisoft\Db\QueryBuilder\Conditions\Interface;
66

7-
use Iterator;
87
use Yiisoft\Db\Expression\Expression;
9-
use Yiisoft\Db\Expression\ExpressionInterface;
108
use Yiisoft\Db\Query\QueryInterface;
119

1210
interface SimpleConditionInterface extends ConditionInterface
@@ -23,7 +21,7 @@ public function getColumn(): string|Expression|QueryInterface;
2321
public function getOperator(): string;
2422

2523
/**
26-
* @return array|ExpressionInterface|int|Iterator|string|null The value to the right of the {@see operator}.
24+
* @return mixed The value to the right of the {@see operator}.
2725
*/
28-
public function getValue(): array|int|string|Iterator|ExpressionInterface|null;
26+
public function getValue(): mixed;
2927
}

src/QueryBuilder/Conditions/SimpleCondition.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44

55
namespace Yiisoft\Db\QueryBuilder\Conditions;
66

7-
use Iterator;
87
use Yiisoft\Db\Exception\InvalidArgumentException;
98
use Yiisoft\Db\Expression\Expression;
10-
use Yiisoft\Db\Expression\ExpressionInterface;
119
use Yiisoft\Db\QueryBuilder\Conditions\Interface\SimpleConditionInterface;
1210
use Yiisoft\Db\Query\QueryInterface;
1311

@@ -21,7 +19,7 @@ final class SimpleCondition implements SimpleConditionInterface
2119
public function __construct(
2220
private string|Expression|QueryInterface $column,
2321
private string $operator,
24-
private array|int|string|Iterator|ExpressionInterface|null $value
22+
private mixed $value
2523
) {
2624
}
2725

@@ -35,7 +33,7 @@ public function getOperator(): string
3533
return $this->operator;
3634
}
3735

38-
public function getValue(): array|int|string|Iterator|ExpressionInterface|null
36+
public function getValue(): mixed
3937
{
4038
return $this->value;
4139
}

0 commit comments

Comments
 (0)