Code Duplication    Length = 4-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
@@ 280-283 (lines=4) @@
277
        }
278
279
        // Check version, if version is higher then update module.json into database.
280
        if (version_compare($module->getVersion(), $data['version'], '<=')) {
281
            $this->getModel()->where(['name' => $data['name']])->update($data);
282
            parent::update($name);
283
        }
284
    }
285
}
286