| @@ 154-161 (lines=8) @@ | ||
| 151 | private function validate(array $item) |
|
| 152 | { |
|
| 153 | switch ($this->batchType) { |
|
| 154 | case self::COMMAND_UPDATE: |
|
| 155 | if (! isset($item['q'])) { |
|
| 156 | throw new Exception("Expected $item to contain 'q' key"); |
|
| 157 | } |
|
| 158 | if (! isset($item['u'])) { |
|
| 159 | throw new Exception("Expected $item to contain 'u' key"); |
|
| 160 | } |
|
| 161 | break; |
|
| 162 | ||
| 163 | case self::COMMAND_DELETE: |
|
| 164 | if (! isset($item['q'])) { |
|
| @@ 163-170 (lines=8) @@ | ||
| 160 | } |
|
| 161 | break; |
|
| 162 | ||
| 163 | case self::COMMAND_DELETE: |
|
| 164 | if (! isset($item['q'])) { |
|
| 165 | throw new Exception("Expected $item to contain 'q' key"); |
|
| 166 | } |
|
| 167 | if (! isset($item['limit'])) { |
|
| 168 | throw new Exception("Expected $item to contain 'limit' key"); |
|
| 169 | } |
|
| 170 | break; |
|
| 171 | } |
|
| 172 | } |
|
| 173 | ||