Code Duplication    Length = 9-9 lines in 2 locations

src/Assert.php 2 locations

@@ 951-959 (lines=9) @@
948
        }
949
    }
950
951
    public static function keyExists($array, $key, $message = '')
952
    {
953
        if (!(isset($array[$key]) || array_key_exists($key, $array))) {
954
            static::reportInvalidArgument(sprintf(
955
                $message ?: 'Expected the key %s to exist.',
956
                static::valueToString($key)
957
            ));
958
        }
959
    }
960
961
    public static function keyNotExists($array, $key, $message = '')
962
    {
@@ 961-969 (lines=9) @@
958
        }
959
    }
960
961
    public static function keyNotExists($array, $key, $message = '')
962
    {
963
        if (isset($array[$key]) || array_key_exists($key, $array)) {
964
            static::reportInvalidArgument(sprintf(
965
                $message ?: 'Expected the key %s to not exist.',
966
                static::valueToString($key)
967
            ));
968
        }
969
    }
970
971
    public static function count($array, $number, $message = '')
972
    {