Passed
Push — master ( af710d...2c0b17 )
by Dan Michael O.
08:29
created

LoanExists   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 31
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A message() 0 3 1
A __construct() 0 2 1
A passes() 0 3 1
1
<?php
2
3
namespace App\Rules;
4
5
use Illuminate\Contracts\Validation\Rule;
0 ignored issues
show
Bug introduced by
The type Illuminate\Contracts\Validation\Rule was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
class LoanExists implements Rule
8
{
9
    /**
10
     * Create a new rule instance.
11
     *
12
     * @return void
13
     */
14
    public function __construct()
15
    {
16
    }
17
18
    /**
19
     * Determine if the validation rule passes.
20
     *
21
     * @param  string  $attribute
22
     * @param  mixed  $value
23
     * @return bool
24
     */
25
    public function passes($attribute, $value)
26
    {
27
        return false;
28
    }
29
30
    /**
31
     * Get the validation error message.
32
     *
33
     * @return string
34
     */
35
    public function message()
36
    {
37
        return 'Lånet ble ikke funnet.';
38
    }
39
}
40