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 | 10 | 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 | 10 | 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 | 10 | public function orWhere($name, $operator = null, $value = null) |
|
54 | |||
55 | 10 | protected function addWhereQuery($logicalOp, $name, $operator = null, $value = null) |
|
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | */ |
||
89 | 5 | public function toSql() |
|
103 | |||
104 | /** |
||
105 | * {@inheritdoc} |
||
106 | */ |
||
107 | public function getBindings() |
||
113 | } |
||
114 |
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.