Completed
Pull Request — master (#25)
by
unknown
02:45
created
lib/Mongo/MongoDeleteBatch.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      *
27 27
      * @see http://php.net/manual/en/mongodeletebatch.construct.php
28 28
      * @param MongoCollection $collection
29
-     * @param array $writeOptions
29
+     * @param array $writeOption
30 30
      */
31 31
     public function __construct(MongoCollection $collection, array $writeOption = [])
32 32
     {
Please login to merge, or discard this patch.
lib/Mongo/MongoInsertBatch.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      *
27 27
      * @see http://php.net/manual/en/mongoinsertbatch.construct.php
28 28
      * @param MongoCollection $collection
29
-     * @param array $writeOptions
29
+     * @param array $writeOption
30 30
      */
31 31
     public function __construct(MongoCollection $collection, array $writeOption = [])
32 32
     {
Please login to merge, or discard this patch.
lib/Mongo/MongoUpdateBatch.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      *
27 27
      * @see http://php.net/manual/en/mongoupdatebatch.construct.php
28 28
      * @param MongoCollection $collection
29
-     * @param array $writeOptions
29
+     * @param array $writeOption
30 30
      */
31 31
     public function __construct(MongoCollection $collection, array $writeOption = [])
32 32
     {
Please login to merge, or discard this patch.
lib/Mongo/MongoWriteBatch.php 1 patch
Spacing   +4 added lines, -4 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
 
@@ -141,11 +141,11 @@  discard block
 block discarded – undo
141 141
     private function validate(array $item)
142 142
     {
143 143
         if ($this->batchType == self::COMMAND_UPDATE) {
144
-            if (! isset($item['q']) || ! isset($item['u'])) {
144
+            if ( ! isset($item['q']) || ! isset($item['u'])) {
145 145
                 throw new Exception('invalid item');
146 146
             }
147 147
         } elseif ($this->batchType == self::COMMAND_DELETE) {
148
-            if (! isset($item['q']) || ! isset($item['limit'])) {
148
+            if ( ! isset($item['q']) || ! isset($item['limit'])) {
149 149
                 throw new Exception('invalid item');
150 150
             }
151 151
         }
Please login to merge, or discard this patch.