@@ -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
@@ -197,9 +193,6 @@ public function guessRequiredForConstraint(Constraint $constraint)
197
193
public function guessMaxLengthForConstraint (Constraint $ constraint )
198
194
{
199
195
switch (get_class ($ constraint )) {
200
- case 'Symfony\Component\Validator\Constraints\MaxLength ' :
201
- return new ValueGuess ($ constraint ->limit , Guess::HIGH_CONFIDENCE );
202
-
203
196
case 'Symfony\Component\Validator\Constraints\Length ' :
204
197
if (is_numeric ($ constraint ->max )) {
205
198
return new ValueGuess ($ constraint ->max , Guess::HIGH_CONFIDENCE );
@@ -212,9 +205,6 @@ public function guessMaxLengthForConstraint(Constraint $constraint)
212
205
}
213
206
break ;
214
207
215
- case 'Symfony\Component\Validator\Constraints\Max ' :
216
- return new ValueGuess (strlen ((string ) $ constraint ->limit ), Guess::LOW_CONFIDENCE );
217
-
218
208
case 'Symfony\Component\Validator\Constraints\Range ' :
219
209
if (is_numeric ($ constraint ->max )) {
220
210
return new ValueGuess (strlen ((string ) $ constraint ->max ), Guess::LOW_CONFIDENCE );
@@ -235,9 +225,6 @@ public function guessMaxLengthForConstraint(Constraint $constraint)
235
225
public function guessPatternForConstraint (Constraint $ constraint )
236
226
{
237
227
switch (get_class ($ constraint )) {
238
- case 'Symfony\Component\Validator\Constraints\MinLength ' :
239
- return new ValueGuess (sprintf ('.{%s,} ' , (string ) $ constraint ->limit ), Guess::LOW_CONFIDENCE );
240
-
241
228
case 'Symfony\Component\Validator\Constraints\Length ' :
242
229
if (is_numeric ($ constraint ->min )) {
243
230
return new ValueGuess (sprintf ('.{%s,} ' , (string ) $ constraint ->min ), Guess::LOW_CONFIDENCE );
@@ -252,9 +239,6 @@ public function guessPatternForConstraint(Constraint $constraint)
252
239
}
253
240
break ;
254
241
255
- case 'Symfony\Component\Validator\Constraints\Min ' :
256
- return new ValueGuess (sprintf ('.{%s,} ' , strlen ((string ) $ constraint ->limit )), Guess::LOW_CONFIDENCE );
257
-
258
242
case 'Symfony\Component\Validator\Constraints\Range ' :
259
243
if (is_numeric ($ constraint ->min )) {
260
244
return new ValueGuess (sprintf ('.{%s,} ' , strlen ((string ) $ constraint ->min )), Guess::LOW_CONFIDENCE );
0 commit comments