@@ 169-176 (lines=8) @@ | ||
166 | private function validate(array $item) |
|
167 | { |
|
168 | switch ($this->batchType) { |
|
169 | case self::COMMAND_UPDATE: |
|
170 | if (! isset($item['q'])) { |
|
171 | throw new Exception("Expected \$item to contain 'q' key"); |
|
172 | } |
|
173 | if (! isset($item['u'])) { |
|
174 | throw new Exception("Expected \$item to contain 'u' key"); |
|
175 | } |
|
176 | break; |
|
177 | ||
178 | case self::COMMAND_DELETE: |
|
179 | if (! isset($item['q'])) { |
|
@@ 178-185 (lines=8) @@ | ||
175 | } |
|
176 | break; |
|
177 | ||
178 | case self::COMMAND_DELETE: |
|
179 | if (! isset($item['q'])) { |
|
180 | throw new Exception("Expected \$item to contain 'q' key"); |
|
181 | } |
|
182 | if (! isset($item['limit'])) { |
|
183 | throw new Exception("Expected \$item to contain 'limit' key"); |
|
184 | } |
|
185 | break; |
|
186 | } |
|
187 | } |
|
188 |