Checks if a key is present and not null.

@param  string|array  $key
@return bool
432982
public function has($key)
    {
        return ! collect(is_array($key) ? $key : func_get_args())->contains(function ($key) {
            return is_null($this->get($key));
        });
    }
1182294
public static function exists($array, $key)
    {
        $key = static::normalizeKey($key);

        if ($key === null || $key === '' || static::isEmpty($array))
        {
            return false;
        }

        $keys = explode('.', $key);
        $currentElement = $array;

        foreach ($keys as $currentKey)
        {
            if (!is_array($currentElement) || !array_key_exists($currentKey, $currentElement))
            {
                return false;
            }

            $currentElement = $currentElement[(string) $currentKey];
        }

        return true;
    }
1065108
public function hasHeader(string $key = null) : bool
	{
		if ($key === null) {
			return false;
		}

		$array = $this->getHeaders();
		return isset($array[$key]) || array_key_exists($key, $array);
	}
770565
public function exists( $key ) {
		return ! collect( is_array( $key ) ? $key : func_get_args() )->contains(
			function ( $key ) {
				return ! Arr::exists( $this->attributes, $key );
			}
		);
	}
30863
public function containsKey(int $key): bool {
        $array = $this->array;
        $array = \array_filter($array, function ($value, $key) {
            return $value !== null;
        }, \ARRAY_FILTER_USE_BOTH);
        return array_key_exists($key, $array);
    }
1340530
public function has($key)
	{
		if (count(func_get_args()) > 1)
		{
			foreach (func_get_args() as $value)
			{
				if ( ! $this->has($value)) return false;
			}

			return true;
		}

		if (is_bool($this->input($key)) || is_array($this->input($key)))
		{
			return true;
		}

		return trim((string) $this->input($key)) !== '';
	}
220977
public function containsKey($key)
    {
        if (!$this->enabled)
            return false;

        $has_key = array_key_exists($this->key($key), $this->cache);

        // $this->Logger->debug("Cache contains {$key}? " . (($has_key) ? 'TRUE' : 'FALSE'));

        return $has_key;
    }
1014555
public function hasByKey($key) {
		$nullValue = ClassHelper::createObject(NullValue::class);
		$value = $this->getByKey($key, $nullValue);
		if($value instanceof NullValue) {
			return false;
		}
		return true;
	}
1316433
public function has($key) {
		$this->check();
		$data = $this->readData();
		return isset($data[$key]);
	}
891511
public function isEmpty($key = null) {
		$result = true;
		if ($key !== null) {
			if (is_object($this->data) && isset($this->data->{$key})) {
				$result = empty($this->data->{$key});
			} elseif (is_array($this->data) && isset($this->data[$key])) {
				$result = empty($this->data[$key]);
			} else {
				$result = true;
			}
		} else {
			$result = empty($this->data);
		}
		return $result;
	}
668969
final public function __isset($key)
	{
		return	array_key_exists($key, $this->_stack) && isset($this->_stack[$key]);
	}
856790
public function has(string $key): bool
    {
        if (array_key_exists($key, $this->ttl) &&
            $this->time() - $this->ttl[$key] > 0
        ) {
            unset($this->ttl[$key]);
            unset($this->storage[$key]);

            return false;
        }

        return array_key_exists($key, $this->storage);
    }
1222616
public function containsKey($key): bool
    {
        return isset($this->items[$key]) || array_key_exists($key, $this->items);
    }
1239735
public function isEmpty($key)
    {
        return !array_has($this->data, $key) || filled(array_get($this->data, $key));
    }
551349
public function has(?string $key) : bool
    {
        return $key === null ? false : isset($this->themes[$key]);
    }
1041803
public function has($key)
    {
        $keys = (func_num_args() > 1) ? func_get_args() : (array) $key;

        foreach ($keys as $key) {
            if(!array_key_exists($key, $this->_data))
                return false;
        }

        return true;
    }
1314065
public function isExist($key = null)
	{
		return $key = is_null($key) ? false : ($this->find($key) ? true : false);
	}