Total Complexity | 4 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
10 | class HashExists implements Rule |
||
11 | { |
||
12 | /** @var Optimus $optimus */ |
||
13 | private $optimus; |
||
14 | |||
15 | /** @var string */ |
||
16 | private $table; |
||
17 | |||
18 | /** @var string */ |
||
19 | private $column; |
||
20 | |||
21 | 9 | public function __construct(string $table, string $column) |
|
22 | { |
||
23 | 9 | $this->optimus = App::make(Optimus::class); |
|
24 | 9 | $this->table = $table; |
|
25 | 9 | $this->column = $column; |
|
26 | 9 | } |
|
27 | |||
28 | /** |
||
29 | * Determine if the validation rule passes. |
||
30 | * |
||
31 | * @param string $attribute |
||
32 | * @param mixed $value |
||
33 | * @return bool |
||
34 | */ |
||
35 | 9 | public function passes($attribute, $value) |
|
44 | } |
||
45 | |||
46 | /** |
||
47 | * Get the validation error message. |
||
48 | * |
||
49 | * @return string |
||
50 | */ |
||
51 | 6 | public function message() |
|
54 | } |
||
55 | } |
||
56 |