Code Duplication    Length = 15-15 lines in 2 locations

lib/Mongo/MongoWriteBatch.php 2 locations

@@ 166-180 (lines=15) @@
163
                }
164
                break;
165
166
            case self::COMMAND_DELETE:
167
                if ($options['writeConcern']->getW() === 0) {
168
                    $resultDocument += [
169
                        'nRemoved' => 0,
170
                        'ok' => true,
171
                    ];
172
173
                    break;
174
                }
175
176
                $resultDocument += [
177
                    'nRemoved' => $writeResult->getDeletedCount(),
178
                    'ok' => true,
179
                ];
180
                break;
181
182
            case self::COMMAND_INSERT:
183
                if ($options['writeConcern']->getW() === 0) {
@@ 182-196 (lines=15) @@
179
                ];
180
                break;
181
182
            case self::COMMAND_INSERT:
183
                if ($options['writeConcern']->getW() === 0) {
184
                    $resultDocument += [
185
                        'nInserted' => 0,
186
                        'ok' => true,
187
                    ];
188
189
                    break;
190
                }
191
192
                $resultDocument += [
193
                    'nInserted' => $writeResult->getInsertedCount(),
194
                    'ok' => true,
195
                ];
196
                break;
197
        }
198
199
        if (! $ok) {