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 | /** |
||
| 24 | * @var bool |
||
| 25 | */ |
||
| 26 | private $isValid; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * @var mixed |
||
| 30 | */ |
||
| 31 | private $input; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @var Rule |
||
| 35 | */ |
||
| 36 | private $rule; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @var Rule[] |
||
| 40 | */ |
||
| 41 | private $children; |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @var array |
||
| 45 | */ |
||
| 46 | private $properties; |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Initializes the object. |
||
| 50 | * |
||
| 51 | * @param bool $isValid |
||
| 52 | * @param mixed $input |
||
| 53 | * @param Rule $rule |
||
| 54 | * @param array $properties |
||
| 55 | * @param Result ...$children |
||
| 56 | */ |
||
| 57 | 15 | public function __construct(bool $isValid, $input, Rule $rule, array $properties = [], Result ...$children) |
|
| 65 | |||
| 66 | /** |
||
| 67 | * Returns whether the result is valid or not. |
||
| 68 | * |
||
| 69 | * @return bool |
||
| 70 | */ |
||
| 71 | 3 | public function isValid(): bool |
|
| 75 | |||
| 76 | /** |
||
| 77 | * Returns the input that was used on the validation. |
||
| 78 | * |
||
| 79 | * @return mixed |
||
| 80 | */ |
||
| 81 | 3 | public function getInput() |
|
| 85 | |||
| 86 | /** |
||
| 87 | * Returns the rule that performed the validation. |
||
| 88 | * |
||
| 89 | * @return Rule |
||
| 90 | */ |
||
| 91 | 3 | public function getRule(): Rule |
|
| 95 | |||
| 96 | /** |
||
| 97 | * Returns the children of the result. |
||
| 98 | * |
||
| 99 | * @return Result[] |
||
| 100 | */ |
||
| 101 | 3 | public function getChildren(): array |
|
| 105 | |||
| 106 | /** |
||
| 107 | * Returns the properties of the result. |
||
| 108 | * |
||
| 109 | * @return array |
||
| 110 | */ |
||
| 111 | 8 | public function getProperties(): array |
|
| 115 | |||
| 116 | /** |
||
| 117 | * Creates a new object with the defined properties. |
||
| 118 | * |
||
| 119 | * @param array $properties |
||
| 120 | * |
||
| 121 | * @return Result |
||
| 122 | */ |
||
| 123 | 6 | public function mergeProperties(array $properties): Result |
|
| 130 | |||
| 131 | /** |
||
| 132 | * Creates a new object with the inverted validation. |
||
| 133 | * |
||
| 134 | * @param array $properties |
||
| 135 | * |
||
| 136 | * @return Result |
||
| 137 | */ |
||
| 138 | 6 | public function invert(): Result |
|
| 145 | } |
||
| 146 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..