Passed
Push — feature/job-env-culture ( 009e4e )
by Tristan
21:55 queued 13:02
created

PasswordCorrectRule::message()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
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
11
{
12
    public function passes($attribute, $value)
1 ignored issue
show
introduced by
Method \App\Services\Validation\Rules\PasswordCorrectRule::passes() does not have parameter type hint nor @param annotation for its parameter $attribute.
Loading history...
introduced by
Method \App\Services\Validation\Rules\PasswordCorrectRule::passes() does not have parameter type hint nor @param annotation for its parameter $value.
Loading history...
introduced by
Method \App\Services\Validation\Rules\PasswordCorrectRule::passes() does not have return type hint nor @return annotation for its return value.
Loading history...
Coding Style Documentation introduced by
Missing doc comment for function passes()
Loading history...
13
    {
14
        return Hash::check($value, Auth::user()->getAuthPassword());
15
    }
16
17
    public function message()
1 ignored issue
show
introduced by
Method \App\Services\Validation\Rules\PasswordCorrectRule::message() does not have return type hint nor @return annotation for its return value.
Loading history...
Coding Style Documentation introduced by
Missing doc comment for function message()
Loading history...
18
    {
19
        return Lang::get('validation.password_correct');
20
    }
21
}
22