@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | public function add($item) |
| 77 | 77 | { |
| 78 | 78 | if (is_object($item)) { |
| 79 | - $item = (array)$item; |
|
| 79 | + $item = (array) $item; |
|
| 80 | 80 | } |
| 81 | 81 | |
| 82 | 82 | $this->validate($item); |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | final public function execute(array $writeOptions = []) |
| 96 | 96 | { |
| 97 | 97 | $writeOptions += $this->writeOptions; |
| 98 | - if (! count($this->items)) { |
|
| 98 | + if ( ! count($this->items)) { |
|
| 99 | 99 | return ['ok' => true]; |
| 100 | 100 | } |
| 101 | 101 | |
@@ -152,19 +152,19 @@ discard block |
||
| 152 | 152 | { |
| 153 | 153 | switch ($this->batchType) { |
| 154 | 154 | case self::COMMAND_UPDATE: |
| 155 | - if (! isset($item['q'])) { |
|
| 155 | + if ( ! isset($item['q'])) { |
|
| 156 | 156 | throw new Exception("Expected $item to contain 'q' key"); |
| 157 | 157 | } |
| 158 | - if (! isset($item['u'])) { |
|
| 158 | + if ( ! isset($item['u'])) { |
|
| 159 | 159 | throw new Exception("Expected $item to contain 'u' key"); |
| 160 | 160 | } |
| 161 | 161 | break; |
| 162 | 162 | |
| 163 | 163 | case self::COMMAND_DELETE: |
| 164 | - if (! isset($item['q'])) { |
|
| 164 | + if ( ! isset($item['q'])) { |
|
| 165 | 165 | throw new Exception("Expected $item to contain 'q' key"); |
| 166 | 166 | } |
| 167 | - if (! isset($item['limit'])) { |
|
| 167 | + if ( ! isset($item['limit'])) { |
|
| 168 | 168 | throw new Exception("Expected $item to contain 'limit' key"); |
| 169 | 169 | } |
| 170 | 170 | break; |
@@ -153,19 +153,19 @@ |
||
| 153 | 153 | switch ($this->batchType) { |
| 154 | 154 | case self::COMMAND_UPDATE: |
| 155 | 155 | if (! isset($item['q'])) { |
| 156 | - throw new Exception("Expected $item to contain 'q' key"); |
|
| 156 | + throw new Exception("expected $item to contain 'q' key"); |
|
| 157 | 157 | } |
| 158 | 158 | if (! isset($item['u'])) { |
| 159 | - throw new Exception("Expected $item to contain 'u' key"); |
|
| 159 | + throw new Exception("expected $item to contain 'u' key"); |
|
| 160 | 160 | } |
| 161 | 161 | break; |
| 162 | 162 | |
| 163 | 163 | case self::COMMAND_DELETE: |
| 164 | 164 | if (! isset($item['q'])) { |
| 165 | - throw new Exception("Expected $item to contain 'q' key"); |
|
| 165 | + throw new Exception("expected $item to contain 'q' key"); |
|
| 166 | 166 | } |
| 167 | 167 | if (! isset($item['limit'])) { |
| 168 | - throw new Exception("Expected $item to contain 'limit' key"); |
|
| 168 | + throw new Exception("expected $item to contain 'limit' key"); |
|
| 169 | 169 | } |
| 170 | 170 | break; |
| 171 | 171 | } |