Code Duplication    Length = 16-16 lines in 2 locations

src/Greenter/Xml/Validator/SummaryValidator.php 1 location

@@ 18-33 (lines=16) @@
15
 * Trait SummaryValidator
16
 * @package Greenter\Xml\Validator
17
 */
18
trait SummaryValidator
19
{
20
    public static function loadValidatorMetadata(ClassMetadata $metadata)
21
    {
22
        $metadata->addPropertyConstraints('correlativo', [
23
            new Assert\NotBlank(),
24
            new Assert\Length(['max' => 3]),
25
        ]);
26
        $metadata->addPropertyConstraint('fecGeneracion', new Assert\Date());
27
        $metadata->addPropertyConstraints('fecResumen', [
28
            new Assert\NotBlank(),
29
            new Assert\Date(),
30
        ]);
31
        $metadata->addPropertyConstraint('details', new Assert\Valid());
32
    }
33
}

src/Greenter/Xml/Validator/VoidedValidator.php 1 location

@@ 18-33 (lines=16) @@
15
 * Trait VoidedValidator
16
 * @package Greenter\Xml\Validator
17
 */
18
trait VoidedValidator
19
{
20
    public static function loadValidatorMetadata(ClassMetadata $metadata)
21
    {
22
        $metadata->addPropertyConstraints('correlativo', [
23
            new Assert\NotBlank(),
24
            new Assert\Length(['max' => 3]),
25
        ]);
26
        $metadata->addPropertyConstraint('fecGeneracion', new Assert\Date());
27
        $metadata->addPropertyConstraints('fecComunicacion', [
28
            new Assert\NotBlank(),
29
            new Assert\Date(),
30
        ]);
31
        $metadata->addPropertyConstraint('details', new Assert\Valid());
32
    }
33
}