9
9
use ValueValidators \ValueValidator ;
10
10
11
11
/**
12
- * ValueValidator that holds base validation functions for any type of object.
13
- *
14
- * @since 0.1
15
- *
16
- * @license GPL-2.0+
17
- * @author Jeroen De Dauw < [email protected] >
12
+ * @internal
18
13
*/
19
14
abstract class ValueValidatorBase implements ValueValidator {
20
15
21
16
/**
22
17
* A list of allowed values. This means the parameters value(s) must be in the list
23
18
* during validation. False for no restriction.
24
19
*
25
- * @since 0.1
26
- *
27
20
* @var array|false
28
21
*/
29
22
protected $ allowedValues = false ;
@@ -32,22 +25,16 @@ abstract class ValueValidatorBase implements ValueValidator {
32
25
* A list of prohibited values. This means the parameters value(s) must
33
26
* not be in the list during validation. False for no restriction.
34
27
*
35
- * @since 0.1
36
- *
37
28
* @var array|false
38
29
*/
39
30
protected $ prohibitedValues = false ;
40
31
41
32
/**
42
- * @since 0.1
43
- *
44
33
* @var array
45
34
*/
46
35
protected $ options = [];
47
36
48
37
/**
49
- * @since 0.1
50
- *
51
38
* @var Error[]
52
39
*/
53
40
protected $ errors = [];
@@ -78,8 +65,6 @@ final public function validate( $value ) {
78
65
/**
79
66
* Checks the value against the allowed values and prohibited values lists in case they are set.
80
67
*
81
- * @since 0.1
82
- *
83
68
* @param mixed $value
84
69
*/
85
70
protected function valueIsAllowed ( $ value ) {
@@ -95,8 +80,6 @@ protected function valueIsAllowed( $value ) {
95
80
/**
96
81
* @see ValueValidator::validate
97
82
*
98
- * @since 0.1
99
- *
100
83
* @param mixed $value
101
84
*/
102
85
abstract public function doValidation ( $ value );
@@ -124,8 +107,6 @@ public function setOptions( array $param ) {
124
107
/**
125
108
* Registers an error message.
126
109
*
127
- * @since 0.1
128
- *
129
110
* @param string $errorMessage
130
111
*/
131
112
protected function addErrorMessage ( $ errorMessage ) {
@@ -135,8 +116,6 @@ protected function addErrorMessage( $errorMessage ) {
135
116
/**
136
117
* Registers an error.
137
118
*
138
- * @since 0.1
139
- *
140
119
* @param Error $error
141
120
*/
142
121
protected function addError ( Error $ error ) {
@@ -146,8 +125,6 @@ protected function addError( Error $error ) {
146
125
/**
147
126
* Registers a list of errors.
148
127
*
149
- * @since 0.1
150
- *
151
128
* @param Error[] $errors
152
129
*/
153
130
protected function addErrors ( array $ errors ) {
@@ -160,8 +137,6 @@ protected function addErrors( array $errors ) {
160
137
* the $optionMap parameter in which keys are source names and values are target
161
138
* names.
162
139
*
163
- * @since 0.1
164
- *
165
140
* @param mixed $value
166
141
* @param ValueValidator $validator
167
142
* @param string|null $property
@@ -196,8 +171,6 @@ protected function runSubValidator(
196
171
/**
197
172
* If the "values" and "excluding" arguments should be held into account.
198
173
*
199
- * @since 0.1
200
- *
201
174
* @return bool
202
175
*/
203
176
protected function enableWhitelistRestrictions () {
@@ -210,8 +183,6 @@ protected function enableWhitelistRestrictions() {
210
183
* TODO: think about how to access set options in general and if we want to have
211
184
* whitelist and baclklist values in the validator objects to begin with.
212
185
*
213
- * @since 0.1
214
- *
215
186
* @return array|bool false
216
187
*/
217
188
public function getWhitelistedValues () {
0 commit comments