We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
1 | <?php |
||
23 | abstract class AbstractRelated implements Rule |
||
24 | { |
||
25 | /** |
||
26 | * @var string |
||
27 | 12 | */ |
|
28 | private $reference; |
||
29 | 12 | ||
30 | 12 | /** |
|
31 | 7 | * @var Rule|null |
|
32 | */ |
||
33 | private $rule; |
||
34 | 12 | ||
35 | 12 | /** |
|
36 | 12 | * @var bool |
|
37 | 12 | */ |
|
38 | private $mandatory = true; |
||
39 | 5 | ||
40 | public function __construct($reference, Rule $rule = null, bool $mandatory = true) |
||
46 | |||
47 | 5 | /** |
|
48 | * @param string $input |
||
49 | * |
||
50 | 3 | * @return bool |
|
51 | */ |
||
52 | 3 | abstract protected function hasReference($input, $reference): bool; |
|
53 | 3 | ||
54 | 3 | /** |
|
55 | * @param string $input |
||
56 | * |
||
57 | 1 | * @return mixed |
|
58 | */ |
||
59 | 1 | abstract protected function getReferenceValue($input, $reference); |
|
60 | 1 | ||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | public function validate($input): Result |
||
81 | } |
||
82 |