Code Duplication    Length = 5-5 lines in 2 locations

src/ActivityLogger.php 2 locations

@@ 44-48 (lines=5) @@
41
42
        $this->authDriver = $config['activitylog']['default_auth_driver'] ?? $auth->getDefaultDriver();
43
44
        if (starts_with(app()->version(), '5.1')) {
45
            $this->causedBy = $auth->driver($this->authDriver)->user();
46
        } else {
47
            $this->causedBy = $auth->guard($this->authDriver)->user();
48
        }
49
50
        $this->logName = $config['activitylog']['default_log_name'];
51
@@ 182-186 (lines=5) @@
179
            return $modelOrId;
180
        }
181
182
        if (starts_with(app()->version(), '5.1')) {
183
            $model = $this->auth->driver($this->authDriver)->getProvider()->retrieveById($modelOrId);
184
        } else {
185
            $model = $this->auth->guard($this->authDriver)->getProvider()->retrieveById($modelOrId);
186
        }
187
188
        if ($model) {
189
            return $model;