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

PasswordPolicyController::submitPasswordPolicy()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 6
ccs 0
cts 4
cp 0
crap 2
rs 10
1
<?php
2
3
namespace App\Http\Controllers\Admin;
4
5
use App\Domains\Admin\PasswordPolicy;
6
use App\Http\Controllers\Controller;
7
use App\Http\Requests\Admin\PasswordPolicyRequest;
8
use Illuminate\Http\Request;
9
10
class PasswordPolicyController extends Controller
11
{
12
    public function submitPasswordPolicy(PasswordPolicyRequest $request)
13
    {
14
        (new PasswordPolicy)->setPolicy($request);
15
        Log::notice('User '.Auth::user()->full_name.' updated User Password Policy requiring resets every '.$request->expire.' days');
0 ignored issues
show
Bug introduced by
The type App\Http\Controllers\Admin\Auth was not found. Did you mean Auth? If so, make sure to prefix the type with \.
Loading history...
Bug introduced by
The type App\Http\Controllers\Admin\Log was not found. Did you mean Log? If so, make sure to prefix the type with \.
Loading history...
16
17
        return response()->json(['success' => true]);
18
    }
19
}
20