Code Duplication    Length = 8-8 lines in 2 locations

src/UI/Resolver/Validator/Implementation/Pure/BooleanValidatorTrait.php 1 location

@@ 21-28 (lines=8) @@
18
     *
19
     * @return boolean|null Value casted into boolean or null
20
     */
21
    public function mustBeBooleanOrEmpty($value, string $propertyPath = null, UIValidatorInterface $parentValidator = null, string $exceptionMessage = null)
22
    {
23
        if ($value === '') {
24
            return null;
25
        }
26
27
        return $this->mustBeBoolean($value, $propertyPath, $parentValidator, $exceptionMessage);
28
    }
29
30
    /**
31
     * Exceptions are caught in order to be processed later

src/UI/Resolver/Validator/Implementation/Pure/IntegerValidatorTrait.php 1 location

@@ 20-27 (lines=8) @@
17
     *
18
     * @return int|null Value casted into int or -1 or null
19
     */
20
    public function mustBeIntegerOrEmpty($value, string $propertyPath = null, UIValidatorInterface $parentValidator = null, string $exceptionMessage = null)
21
    {
22
        if ($value === '') {
23
            return null;
24
        }
25
26
        return $this->mustBeInteger($value, $propertyPath, $parentValidator, $exceptionMessage);
27
    }
28
29
    /**
30
     * Exceptions are caught in order to be processed later