Completed
Push — bug/accordion ( 6550f4...474aef )
by Grant
12:54 queued 07:32
created

PasswordCorrectRule   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 3
dl 0
loc 10
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A message() 0 3 1
A passes() 0 3 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace App\Services\Validation\Rules;
4
5
use Illuminate\Contracts\Validation\Rule;
6
use Illuminate\Support\Facades\Hash;
7
use Illuminate\Support\Facades\Auth;
8
use Illuminate\Support\Facades\Lang;
9
10
class PasswordCorrectRule implements Rule
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class PasswordCorrectRule
Loading history...
11
{
12 10
    public function passes($attribute, $value)
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function passes()
Loading history...
13
    {
14 10
        return Hash::check($value, Auth::user()->getAuthPassword());
15
    }
16
17 2
    public function message()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function message()
Loading history...
18
    {
19 2
        return Lang::get('validation.password_correct');
20
    }
21
}
22