1 | <?php namespace Limoncello\Validation\Validator; |
||
27 | abstract class BaseValidator implements ValidatorInterface |
||
28 | { |
||
29 | |||
30 | /** |
||
31 | * @var RuleInterface |
||
32 | */ |
||
33 | private $rule; |
||
34 | |||
35 | /** |
||
36 | * @param RuleInterface $rule |
||
37 | */ |
||
38 | 29 | public function __construct(RuleInterface $rule) |
|
42 | |||
43 | /** |
||
44 | * @inheritdoc |
||
45 | */ |
||
46 | 29 | public function validate($input) |
|
58 | |||
59 | /** |
||
60 | * @param RuleInterface $rule |
||
61 | * |
||
62 | * @return static |
||
63 | */ |
||
64 | 29 | public static function validator(RuleInterface $rule) |
|
68 | |||
69 | /** |
||
70 | * @return ErrorAggregatorInterface |
||
|
|||
71 | */ |
||
72 | 29 | protected function createErrorAggregator() |
|
76 | } |
||
77 |
This check looks for the generic type
array
as a return type and suggests a more specific type. This type is inferred from the actual code.