Code Duplication    Length = 10-10 lines in 2 locations

src/Assert.php 2 locations

@@ 620-629 (lines=10) @@
617
        }
618
    }
619
620
    public static function endsWith($value, $suffix, $message = '')
621
    {
622
        if ($suffix !== substr($value, -static::strlen($suffix))) {
623
            static::reportInvalidArgument(sprintf(
624
                $message ?: 'Expected a value to end with %2$s. Got: %s',
625
                static::valueToString($value),
626
                static::valueToString($suffix)
627
            ));
628
        }
629
    }
630
631
    public static function regex($value, $pattern, $message = '')
632
    {
@@ 851-860 (lines=10) @@
848
        }
849
    }
850
851
    public static function implementsInterface($value, $interface, $message = '')
852
    {
853
        if (!in_array($interface, class_implements($value))) {
854
            static::reportInvalidArgument(sprintf(
855
                $message ?: 'Expected an implementation of %2$s. Got: %s',
856
                static::valueToString($value),
857
                static::valueToString($interface)
858
            ));
859
        }
860
    }
861
862
    public static function propertyExists($classOrObject, $property, $message = '')
863
    {