Completed
Push — master ( 030f70...fd4f15 )
by Andreas
23:15
created
lib/Mongo/MongoWriteBatch.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     public function add($item)
84 84
     {
85 85
         if (is_object($item)) {
86
-            $item = (array)$item;
86
+            $item = (array) $item;
87 87
         }
88 88
 
89 89
         $this->validate($item);
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
     final public function execute(array $writeOptions = [])
103 103
     {
104 104
         $writeOptions += $this->writeOptions;
105
-        if (! count($this->items)) {
105
+        if ( ! count($this->items)) {
106 106
             return ['ok' => true];
107 107
         }
108 108
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
                 break;
168 168
         }
169 169
 
170
-        if (! $ok) {
170
+        if ( ! $ok) {
171 171
             // Exception code is hardcoded to the value in ext-mongo, see
172 172
             // https://github.com/mongodb/mongo-php-driver-legacy/blob/ab4bc0d90e93b3f247f6bcb386d0abc8d2fa7d74/batch/write.c#L428
173 173
             throw new \MongoWriteConcernException('Failed write', 911, null, $resultDocument);
@@ -180,19 +180,19 @@  discard block
 block discarded – undo
180 180
     {
181 181
         switch ($this->batchType) {
182 182
             case self::COMMAND_UPDATE:
183
-                if (! isset($item['q'])) {
183
+                if ( ! isset($item['q'])) {
184 184
                     throw new Exception("Expected \$item to contain 'q' key");
185 185
                 }
186
-                if (! isset($item['u'])) {
186
+                if ( ! isset($item['u'])) {
187 187
                     throw new Exception("Expected \$item to contain 'u' key");
188 188
                 }
189 189
                 break;
190 190
 
191 191
             case self::COMMAND_DELETE:
192
-                if (! isset($item['q'])) {
192
+                if ( ! isset($item['q'])) {
193 193
                     throw new Exception("Expected \$item to contain 'q' key");
194 194
                 }
195
-                if (! isset($item['limit'])) {
195
+                if ( ! isset($item['limit'])) {
196 196
                     throw new Exception("Expected \$item to contain 'limit' key");
197 197
                 }
198 198
                 break;
Please login to merge, or discard this patch.