Code Duplication    Length = 9-9 lines in 2 locations

src/Assert.php 2 locations

@@ 961-969 (lines=9) @@
958
        }
959
    }
960
961
    public static function keyExists($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 exist.',
966
                static::valueToString($key)
967
            ));
968
        }
969
    }
970
971
    public static function keyNotExists($array, $key, $message = '')
972
    {
@@ 971-979 (lines=9) @@
968
        }
969
    }
970
971
    public static function keyNotExists($array, $key, $message = '')
972
    {
973
        if (isset($array[$key]) || array_key_exists($key, $array)) {
974
            static::reportInvalidArgument(sprintf(
975
                $message ?: 'Expected the key %s to not exist.',
976
                static::valueToString($key)
977
            ));
978
        }
979
    }
980
981
    public static function count($array, $number, $message = '')
982
    {