1 | <?php |
||
8 | trait Where |
||
9 | { |
||
10 | /** |
||
11 | * @var Conditions |
||
12 | */ |
||
13 | protected $where; |
||
14 | |||
15 | /** |
||
16 | * Adds a column based condition condition |
||
17 | * |
||
18 | * @param string $column |
||
19 | * @param null $value |
||
20 | * @param string $condition |
||
21 | * |
||
22 | * @return $this |
||
23 | */ |
||
24 | 14 | public function where($column, $value = null, $condition = '=') |
|
37 | |||
38 | 1 | public function whereSprintf(string $format, ...$bindInline) |
|
44 | |||
45 | /** |
||
46 | * Helper method for situation when you need to query by primary key |
||
47 | * which consists of multiple columns. Only works for `=` and `IN` |
||
48 | * |
||
49 | * @param array $columns |
||
50 | * @param array $values |
||
51 | * @param $condition |
||
52 | * |
||
53 | * @return $this |
||
54 | */ |
||
55 | 1 | public function whereMultiple(array $columns, array $values, $condition) |
|
82 | |||
83 | 4 | public function orWhere(string $column, $value = null, $condition = '=') |
|
93 | |||
94 | 1 | public function orWhereSprintf(string $format, ...$bindInline) |
|
100 | |||
101 | 1 | public function whereAll(array $columnsValues, $isSet = true) |
|
124 | |||
125 | 4 | public function whereStartSet() |
|
131 | |||
132 | 2 | public function orWhereStartSet() |
|
138 | |||
139 | 3 | public function endSet() |
|
147 | |||
148 | 1 | public function groupCurrentWhere() |
|
154 | |||
155 | 19 | public function resetWhere() |
|
161 | } |
||
162 |
This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.
Unreachable code is most often the result of
return
,die
orexit
statements that have been added for debug purposes.In the above example, the last
return false
will never be executed, because a return statement has already been met in every possible execution path.