@@ -145,14 +145,10 @@ public function guessTypeForConstraint(Constraint $constraint)
145
145
case 'Symfony\Component\Validator\Constraints\Ip ' :
146
146
return new TypeGuess ('text ' , array (), Guess::MEDIUM_CONFIDENCE );
147
147
148
- case 'Symfony\Component\Validator\Constraints\MaxLength ' :
149
- case 'Symfony\Component\Validator\Constraints\MinLength ' :
150
148
case 'Symfony\Component\Validator\Constraints\Length ' :
151
149
case 'Symfony\Component\Validator\Constraints\Regex ' :
152
150
return new TypeGuess ('text ' , array (), Guess::LOW_CONFIDENCE );
153
151
154
- case 'Symfony\Component\Validator\Constraints\Min ' :
155
- case 'Symfony\Component\Validator\Constraints\Max ' :
156
152
case 'Symfony\Component\Validator\Constraints\Range ' :
157
153
return new TypeGuess ('number ' , array (), Guess::LOW_CONFIDENCE );
158
154
@@ -196,9 +192,6 @@ public function guessRequiredForConstraint(Constraint $constraint)
196
192
public function guessMaxLengthForConstraint (Constraint $ constraint )
197
193
{
198
194
switch (get_class ($ constraint )) {
199
- case 'Symfony\Component\Validator\Constraints\MaxLength ' :
200
- return new ValueGuess ($ constraint ->limit , Guess::HIGH_CONFIDENCE );
201
-
202
195
case 'Symfony\Component\Validator\Constraints\Length ' :
203
196
if (is_numeric ($ constraint ->max )) {
204
197
return new ValueGuess ($ constraint ->max , Guess::HIGH_CONFIDENCE );
@@ -211,9 +204,6 @@ public function guessMaxLengthForConstraint(Constraint $constraint)
211
204
}
212
205
break ;
213
206
214
- case 'Symfony\Component\Validator\Constraints\Max ' :
215
- return new ValueGuess (strlen ((string ) $ constraint ->limit ), Guess::LOW_CONFIDENCE );
216
-
217
207
case 'Symfony\Component\Validator\Constraints\Range ' :
218
208
if (is_numeric ($ constraint ->max )) {
219
209
return new ValueGuess (strlen ((string ) $ constraint ->max ), Guess::LOW_CONFIDENCE );
@@ -234,9 +224,6 @@ public function guessMaxLengthForConstraint(Constraint $constraint)
234
224
public function guessPatternForConstraint (Constraint $ constraint )
235
225
{
236
226
switch (get_class ($ constraint )) {
237
- case 'Symfony\Component\Validator\Constraints\MinLength ' :
238
- return new ValueGuess (sprintf ('.{%s,} ' , (string ) $ constraint ->limit ), Guess::LOW_CONFIDENCE );
239
-
240
227
case 'Symfony\Component\Validator\Constraints\Length ' :
241
228
if (is_numeric ($ constraint ->min )) {
242
229
return new ValueGuess (sprintf ('.{%s,} ' , (string ) $ constraint ->min ), Guess::LOW_CONFIDENCE );
@@ -251,9 +238,6 @@ public function guessPatternForConstraint(Constraint $constraint)
251
238
}
252
239
break ;
253
240
254
- case 'Symfony\Component\Validator\Constraints\Min ' :
255
- return new ValueGuess (sprintf ('.{%s,} ' , strlen ((string ) $ constraint ->limit )), Guess::LOW_CONFIDENCE );
256
-
257
241
case 'Symfony\Component\Validator\Constraints\Range ' :
258
242
if (is_numeric ($ constraint ->min )) {
259
243
return new ValueGuess (sprintf ('.{%s,} ' , strlen ((string ) $ constraint ->min )), Guess::LOW_CONFIDENCE );
0 commit comments