| @@ 182-189 (lines=8) @@ | ||
| 179 | private function validate(array $item) |
|
| 180 | { |
|
| 181 | switch ($this->batchType) { |
|
| 182 | case self::COMMAND_UPDATE: |
|
| 183 | if (! isset($item['q'])) { |
|
| 184 | throw new Exception("Expected \$item to contain 'q' key"); |
|
| 185 | } |
|
| 186 | if (! isset($item['u'])) { |
|
| 187 | throw new Exception("Expected \$item to contain 'u' key"); |
|
| 188 | } |
|
| 189 | break; |
|
| 190 | ||
| 191 | case self::COMMAND_DELETE: |
|
| 192 | if (! isset($item['q'])) { |
|
| @@ 191-198 (lines=8) @@ | ||
| 188 | } |
|
| 189 | break; |
|
| 190 | ||
| 191 | case self::COMMAND_DELETE: |
|
| 192 | if (! isset($item['q'])) { |
|
| 193 | throw new Exception("Expected \$item to contain 'q' key"); |
|
| 194 | } |
|
| 195 | if (! isset($item['limit'])) { |
|
| 196 | throw new Exception("Expected \$item to contain 'limit' key"); |
|
| 197 | } |
|
| 198 | break; |
|
| 199 | } |
|
| 200 | } |
|
| 201 | ||