Passed
Push — dev5a ( 01b7fe...d46f4b )
by Ron
07:10
created

SettingsDomain   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 9
ccs 0
cts 6
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateSettings() 0 7 1
1
<?php
2
3
namespace App\Domains\Admin;
4
5
use App\Settings;
6
use Illuminate\Support\Facades\Auth;
7
use Illuminate\Support\Facades\Log;
8
9
10
class SettingsDomain
11
{
12
    public function updateSettings($key, $value)
13
    {
14
        Settings::firstOrCreate(
15
            ['key' => $key],
16
            ['key' => $key, 'value' => $value]
17
        )->update(['value' => $value]);
18
        return true;
19
    }
20
}
21