Code Duplication    Length = 10-10 lines in 2 locations

src/Assert.php 2 locations

@@ 1074-1083 (lines=10) @@
1071
     *
1072
     * @throws InvalidArgumentException
1073
     */
1074
    public static function endsWith($value, $suffix, $message = '')
1075
    {
1076
        if ($suffix !== \substr($value, -\strlen($suffix))) {
1077
            static::reportInvalidArgument(\sprintf(
1078
                $message ?: 'Expected a value to end with %2$s. Got: %s',
1079
                static::valueToString($value),
1080
                static::valueToString($suffix)
1081
            ));
1082
        }
1083
    }
1084
1085
    /**
1086
     * @param mixed  $value
@@ 1477-1486 (lines=10) @@
1474
     *
1475
     * @throws InvalidArgumentException
1476
     */
1477
    public static function implementsInterface($value, $interface, $message = '')
1478
    {
1479
        if (!\in_array($interface, \class_implements($value))) {
1480
            static::reportInvalidArgument(\sprintf(
1481
                $message ?: 'Expected an implementation of %2$s. Got: %s',
1482
                static::valueToString($value),
1483
                static::valueToString($interface)
1484
            ));
1485
        }
1486
    }
1487
1488
    /**
1489
     * @param string|object $classOrObject