Total Complexity | 3 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | abstract class AbstractValidationRule |
||
15 | { |
||
16 | /** |
||
17 | * @var null |
||
18 | */ |
||
19 | public $validationRule; |
||
20 | |||
21 | /** |
||
22 | * @param $attribute |
||
23 | * @param $value |
||
24 | * @param $parameters |
||
25 | * @param $validator |
||
26 | * @return bool |
||
27 | */ |
||
28 | abstract public function rule($attribute, $value, $parameters, $validator): bool; |
||
29 | |||
30 | /** |
||
31 | * Set validation Rule name. |
||
32 | * |
||
33 | * @param string $name |
||
34 | */ |
||
35 | public function setValidationRule(string $name): void |
||
36 | { |
||
37 | $this->validationRule = $name; |
||
|
|||
38 | } |
||
39 | |||
40 | /** |
||
41 | * Get validation Rule name. |
||
42 | * |
||
43 | * @return string |
||
44 | */ |
||
45 | public function getValidationRule(): string |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * Register laravel validation extension. |
||
52 | */ |
||
53 | public function register(): void |
||
61 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..