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 Result[] |
||
40 | */ |
||
41 | private $children; |
||
42 | |||
43 | /** |
||
44 | * @var array |
||
45 | */ |
||
46 | private $properties; |
||
47 | |||
48 | /** |
||
49 | * @var bool |
||
50 | */ |
||
51 | private $isInverted = false; |
||
52 | |||
53 | /** |
||
54 | * Initializes the object. |
||
55 | * |
||
56 | * @param bool $isValid |
||
57 | * @param mixed $input |
||
58 | * @param Rule $rule |
||
59 | * @param array $properties |
||
60 | * @param Result $child |
||
61 | * @param Result ...$child2 |
||
62 | */ |
||
63 | 15 | public function __construct(bool $isValid, $input, Rule $rule, array $properties = [], Result ...$child) |
|
71 | |||
72 | /** |
||
73 | * Returns whether the result is valid or not. |
||
74 | * |
||
75 | * @return bool |
||
76 | */ |
||
77 | 2 | public function isValid(): bool |
|
81 | |||
82 | /** |
||
83 | * Returns the input that was used on the validation. |
||
84 | * |
||
85 | * @return mixed |
||
86 | */ |
||
87 | 2 | public function getInput() |
|
91 | |||
92 | /** |
||
93 | * Returns the rule that performed the validation. |
||
94 | * |
||
95 | * @return Rule |
||
96 | */ |
||
97 | 2 | public function getRule(): Rule |
|
101 | |||
102 | /** |
||
103 | * Returns the children of the result. |
||
104 | * |
||
105 | * @return Result[] |
||
106 | */ |
||
107 | 2 | public function getChildren(): array |
|
111 | |||
112 | /** |
||
113 | * Returns the properties of the result. |
||
114 | * |
||
115 | * @return array |
||
116 | */ |
||
117 | 3 | public function getProperties(): array |
|
121 | |||
122 | /** |
||
123 | * Returns whether the result is inverted or not. |
||
124 | * |
||
125 | * @return bool |
||
126 | */ |
||
127 | 3 | public function isInverted(): bool |
|
131 | |||
132 | /** |
||
133 | * Creates a new object with the inverted validation. |
||
134 | * |
||
135 | * @return Result |
||
136 | */ |
||
137 | 9 | public function invert(): Result |
|
145 | } |
||
146 |