| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public static function loadValidatorMetadata(ClassMetadata $metadata) |
||
| 21 | { |
||
| 22 | $metadata->addPropertyConstraints('tipoDoc', [ |
||
| 23 | new Assert\NotBlank(), |
||
| 24 | new Assert\Length([ |
||
| 25 | 'min' => 2, |
||
| 26 | 'max' => 2, |
||
| 27 | ]), |
||
| 28 | ]); |
||
| 29 | $metadata->addPropertyConstraints('serie', [ |
||
| 30 | new Assert\NotBlank(), |
||
| 31 | new Assert\Length([ |
||
| 32 | 'min' => 4, |
||
| 33 | 'max' => 4, |
||
| 34 | ]), |
||
| 35 | ]); |
||
| 36 | $metadata->addPropertyConstraints('correlativo', [ |
||
| 37 | new Assert\NotBlank(), |
||
| 38 | new Assert\Length(['max' => 8]), |
||
| 39 | ]); |
||
| 40 | $metadata->addPropertyConstraints('desMotivoBaja', [ |
||
| 41 | new Assert\NotBlank(), |
||
| 42 | new Assert\Length(['max' => 100]), |
||
| 43 | ]); |
||
| 44 | } |
||
| 45 | } |