1 | <?php |
||
12 | class LogicalExpression implements ExpressionInterface |
||
13 | { |
||
14 | /** @var array */ |
||
15 | protected $operators = []; |
||
16 | |||
17 | /** @var \Wandu\Database\Contracts\ExpressionInterface[] */ |
||
18 | protected $expressions = []; |
||
19 | |||
20 | /** |
||
21 | * @param string|array|callable $name |
||
22 | * @param string $operator |
||
23 | * @param string $value |
||
24 | * @return static |
||
25 | */ |
||
26 | 33 | public function where($name, $operator = null, $value = null) |
|
30 | |||
31 | /** |
||
32 | * @param string|array|callable $name |
||
33 | * @param string $operator |
||
34 | * @param string $value |
||
35 | * @return static |
||
36 | */ |
||
37 | 33 | public function andWhere($name, $operator = null, $value = null) |
|
42 | |||
43 | /** |
||
44 | * @param string|array|callable $name |
||
45 | * @param string $operator |
||
46 | * @param string $value |
||
47 | * @return static |
||
48 | */ |
||
49 | 11 | public function orWhere($name, $operator = null, $value = null) |
|
54 | |||
55 | 33 | protected function addWhereQuery($logicalOp, $name, $operator = null, $value = null) |
|
84 | |||
85 | /** |
||
86 | * {@inheritdoc} |
||
87 | */ |
||
88 | 6 | public function toSql() |
|
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | public function getBindings() |
||
112 | } |
||
113 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.