Code Duplication    Length = 3-6 lines in 2 locations

src/Laravel/LaravelDatabaseRepository.php 2 locations

@@ 255-260 (lines=6) @@
252
                $module = $this->find($data['name']);
253
                if (!$module) {
254
                    $modules[] = $this->getModel()->create($data);
255
                } else {
256
                    // Check version, if version is higher then update module.json into database.
257
                    if (version_compare($module->getVersion(), $data['version'], '<')) {
258
                        $modules[] = $this->getModel()->where(['name' => $data['name']])->update($data);
259
                    }
260
                }
261
            }
262
        }
263
@@ 282-284 (lines=3) @@
279
            }
280
281
            // Check version, if version is higher then update module.json into database.
282
            if (version_compare($module->getVersion(), $data['version'], '<=')) {
283
                $this->getModel()->where(['name' => $data['name']])->update($data);
284
            }
285
        }
286
287
        parent::update($name);