1 | <?php |
||
17 | abstract class UpdateAbstract extends StatementAbstract implements UpdateInterface{ |
||
18 | use WhereTrait; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $table; |
||
24 | |||
25 | /** |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $set = []; |
||
29 | |||
30 | /** |
||
31 | * @return string |
||
32 | * @throws \chillerlan\Database\Query\QueryException |
||
33 | */ |
||
34 | public function sql():string{ |
||
52 | |||
53 | /** |
||
54 | * @param string|null $tablename |
||
55 | * |
||
56 | * @return \chillerlan\Database\Query\UpdateInterface |
||
57 | */ |
||
58 | public function table(string $tablename):UpdateInterface{ |
||
63 | |||
64 | /** |
||
65 | * @param array $set |
||
66 | * @param bool $bind |
||
67 | * |
||
68 | * @return \chillerlan\Database\Query\UpdateInterface |
||
69 | */ |
||
70 | public function set(array $set, bool $bind = true):UpdateInterface{ |
||
94 | |||
95 | /** |
||
96 | * @param $val1 |
||
97 | * @param $val2 |
||
98 | * @param string $operator |
||
99 | * @param bool $bind |
||
100 | * @param string $join |
||
101 | * |
||
102 | * @return \chillerlan\Database\Query\UpdateInterface |
||
103 | */ |
||
104 | public function where($val1, $val2, $operator = '=', $bind = true, $join = 'AND'):UpdateInterface{ |
||
107 | |||
108 | /** |
||
109 | * @param null $join |
||
110 | * |
||
111 | * @return \chillerlan\Database\Query\UpdateInterface |
||
112 | */ |
||
113 | public function openBracket($join = null):UpdateInterface{ |
||
116 | |||
117 | /** |
||
118 | * @return \chillerlan\Database\Query\UpdateInterface |
||
119 | */ |
||
120 | public function closeBracket():UpdateInterface{ |
||
123 | |||
124 | } |
||
125 |
This check looks for the bodies of
elseif
statements that have no statements or where all statements have been commented out. This may be the result of changes for debugging or the code may simply be obsolete.These
elseif
bodies can be removed. If you have an empty elseif but statements in theelse
branch, consider inverting the condition.