We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 18 | abstract class AbstractRelated2 implements Rule |
||
| 19 | { |
||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | private $reference; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var Rule|null |
||
| 27 | */ |
||
| 28 | private $rule; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * @var bool |
||
| 32 | */ |
||
| 33 | private $mandatory = true; |
||
| 34 | |||
| 35 | 1 | public function __construct(string $reference, Rule $rule = null, bool $mandatory = true) |
|
| 41 | |||
| 42 | /** |
||
| 43 | * @param string $input |
||
| 44 | * |
||
| 45 | * @return bool |
||
| 46 | */ |
||
| 47 | abstract protected function hasReference($input, string $reference): bool; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @param string $input |
||
| 51 | * |
||
| 52 | * @return mixed |
||
| 53 | */ |
||
| 54 | abstract protected function getReferenceValue($input, string $reference); |
||
| 55 | |||
| 56 | /** |
||
| 57 | * {@inheritdoc} |
||
| 58 | */ |
||
| 59 | 16 | public function validate($input): Result |
|
| 76 | } |
||
| 77 |