Total Complexity | 2 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
19 | abstract class AbstractCustom |
||
20 | { |
||
21 | /** |
||
22 | * @var array Rule properties |
||
23 | */ |
||
24 | public $config = [ |
||
25 | 'full_class' => '', |
||
26 | 'alias' => [], |
||
27 | 'args_count' => 0, |
||
28 | 'args_type' => [], |
||
29 | ]; |
||
30 | |||
31 | /** |
||
32 | * @var string Error message |
||
33 | */ |
||
34 | protected $message = ''; |
||
35 | |||
36 | /** |
||
37 | * @var Closure Rule custom function for validate or sanitize. |
||
38 | */ |
||
39 | protected $callback; |
||
40 | |||
41 | /** |
||
42 | * Class Constructor. |
||
43 | * |
||
44 | * @param Closure $callback |
||
45 | * @param array $config |
||
46 | * @param string $message |
||
47 | */ |
||
48 | 7 | public function __construct(Closure $callback, array $config, string $message) |
|
53 | 7 | } |
|
54 | |||
55 | /** |
||
56 | * Return error message. |
||
57 | * |
||
58 | * @return string Error message |
||
59 | */ |
||
60 | 2 | public function getMessage(): string |
|
65 |