Code Duplication    Length = 10-10 lines in 2 locations

src/Assert.php 2 locations

@@ 694-703 (lines=10) @@
691
        }
692
    }
693
694
    public static function endsWith($value, $suffix, $message = '')
695
    {
696
        if ($suffix !== substr($value, -static::strlen($suffix))) {
697
            static::reportInvalidArgument(sprintf(
698
                $message ?: 'Expected a value to end with %2$s. Got: %s',
699
                static::valueToString($value),
700
                static::valueToString($suffix)
701
            ));
702
        }
703
    }
704
705
    public static function regex($value, $pattern, $message = '')
706
    {
@@ 936-945 (lines=10) @@
933
        }
934
    }
935
936
    public static function implementsInterface($value, $interface, $message = '')
937
    {
938
        if (!in_array($interface, class_implements($value))) {
939
            static::reportInvalidArgument(sprintf(
940
                $message ?: 'Expected an implementation of %2$s. Got: %s',
941
                static::valueToString($value),
942
                static::valueToString($interface)
943
            ));
944
        }
945
    }
946
947
    public static function propertyExists($classOrObject, $property, $message = '')
948
    {