Code Duplication    Length = 10-10 lines in 2 locations

src/Assert.php 2 locations

@@ 839-848 (lines=10) @@
836
        {
837
            return $this;
838
        }
839
        if ( strtotime($this->value) === false )
840
        {
841
            $message = $message ?: $this->overrideError;
842
            $message = sprintf(
843
                $message ?: 'Value "%s" is not a date.',
844
                $this->stringify($this->value)
845
            );
846
847
            throw $this->createException($message, $this->overrideCode ?: self::INVALID_DATE, $fieldName);
848
        }
849
850
        return $this;
851
    }
@@ 2633-2642 (lines=10) @@
2630
        {
2631
            return $this;
2632
        }
2633
        if ( null === json_decode($this->value) && JSON_ERROR_NONE !== json_last_error() )
2634
        {
2635
            $message = $message ?: $this->overrideError;
2636
            $message = sprintf(
2637
                $message ?: 'Value "%s" is not a valid JSON string.',
2638
                $this->stringify($this->value)
2639
            );
2640
2641
            throw $this->createException($message, $this->overrideCode ?: self::INVALID_JSON_STRING, $fieldName);
2642
        }
2643
2644
        return $this;
2645
    }