We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php | ||
| 21 | final class Result | ||
| 22 | { | ||
| 23 | const TEMPLATE_KEY = '__id'; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * @var bool | ||
| 27 | */ | ||
| 28 | private $isValid; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * @var mixed | ||
| 32 | */ | ||
| 33 | private $input; | ||
| 34 | |||
| 35 | /** | ||
| 36 | * @var Rule | ||
| 37 | */ | ||
| 38 | private $rule; | ||
| 39 | |||
| 40 | /** | ||
| 41 | * @var Result[] | ||
| 42 | */ | ||
| 43 | private $children; | ||
| 44 | |||
| 45 | /** | ||
| 46 | * @var array | ||
| 47 | */ | ||
| 48 | private $properties; | ||
| 49 | |||
| 50 | /** | ||
| 51 | * @var bool | ||
| 52 | */ | ||
| 53 | private $isInverted = false; | ||
| 54 | |||
| 55 | /** | ||
| 56 | * Initializes the object. | ||
| 57 | * | ||
| 58 | * @param bool $isValid | ||
| 59 | * @param mixed $input | ||
| 60 | * @param Rule $rule | ||
| 61 | * @param array $properties | ||
| 62 | * @param Result $child | ||
| 63 | * @param Result ...$child2 | ||
| 64 | */ | ||
| 65 | 15 | public function __construct(bool $isValid, $input, Rule $rule, array $properties = [], Result ...$child) | |
| 73 | |||
| 74 | /** | ||
| 75 | * Returns whether the result is valid or not. | ||
| 76 | * | ||
| 77 | * @return bool | ||
| 78 | */ | ||
| 79 | 2 | public function isValid(): bool | |
| 83 | |||
| 84 | /** | ||
| 85 | * Returns the input that was used on the validation. | ||
| 86 | * | ||
| 87 | * @return mixed | ||
| 88 | */ | ||
| 89 | 2 | public function getInput() | |
| 93 | |||
| 94 | /** | ||
| 95 | * Returns the rule that performed the validation. | ||
| 96 | * | ||
| 97 | * @return Rule | ||
| 98 | */ | ||
| 99 | 2 | public function getRule(): Rule | |
| 103 | |||
| 104 | /** | ||
| 105 | * Returns the children of the result. | ||
| 106 | * | ||
| 107 | * @return Result[] | ||
| 108 | */ | ||
| 109 | 2 | public function getChildren(): array | |
| 113 | |||
| 114 | /** | ||
| 115 | * Returns the properties of the result. | ||
| 116 | * | ||
| 117 | * @return array | ||
| 118 | */ | ||
| 119 | 3 | public function getProperties(): array | |
| 123 | |||
| 124 | /** | ||
| 125 | * Returns whether the result is inverted or not. | ||
| 126 | * | ||
| 127 | * @return bool | ||
| 128 | */ | ||
| 129 | 3 | public function isInverted(): bool | |
| 133 | |||
| 134 | /** | ||
| 135 | * Creates a new object with the inverted validation. | ||
| 136 | * | ||
| 137 | * @return Result | ||
| 138 | */ | ||
| 139 | 9 | public function invert(): Result | |
| 147 | |||
| 148 | public function hasChildren(): bool | ||
| 152 | } | ||
| 153 |