Completed
Pull Request — master (#41)
by
unknown
03:50
created
lib/Mongo/MongoWriteBatch.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.