Code Duplication    Length = 9-9 lines in 2 locations

src/Assert.php 2 locations

@@ 929-937 (lines=9) @@
926
        }
927
    }
928
929
    public static function keyExists($array, $key, $message = '')
930
    {
931
        if (!(isset($array[$key]) || array_key_exists($key, $array))) {
932
            static::reportInvalidArgument(sprintf(
933
                $message ?: 'Expected the key %s to exist.',
934
                static::valueToString($key)
935
            ));
936
        }
937
    }
938
939
    public static function keyNotExists($array, $key, $message = '')
940
    {
@@ 939-947 (lines=9) @@
936
        }
937
    }
938
939
    public static function keyNotExists($array, $key, $message = '')
940
    {
941
        if (isset($array[$key]) || array_key_exists($key, $array)) {
942
            static::reportInvalidArgument(sprintf(
943
                $message ?: 'Expected the key %s to not exist.',
944
                static::valueToString($key)
945
            ));
946
        }
947
    }
948
949
    public static function count($array, $number, $message = '')
950
    {