Automattic\WooCommerce\Vendor\GraphQL\Utils

MixedStore::offsetUnsetpublicWC 1.0ReturnTypeWillChange

Method of the class: MixedStore{}

No Hooks.

Returns

null. Nothing (null).

Usage

$MixedStore = new MixedStore();
$MixedStore->offsetUnset( $offset ): void;
$offset(mixed) (required)
.

MixedStore::offsetUnset() code WC 10.9.1

public function offsetUnset($offset): void
{
    if ($offset === true) {
        $this->trueValue = null;
        $this->trueValueIsSet = false;
    } elseif ($offset === false) {
        $this->falseValue = null;
        $this->falseValueIsSet = false;
    } elseif (is_int($offset) || is_string($offset)) {
        unset($this->standardStore[$offset]);
    } elseif (is_float($offset)) {
        unset($this->floatStore[(string) $offset]);
    } elseif (is_object($offset)) {
        $this->objectStore->offsetUnset($offset);
    } elseif (is_array($offset)) {
        $index = array_search($offset, $this->arrayKeys, true);

        if ($index !== false) {
            array_splice($this->arrayKeys, $index, 1);
            array_splice($this->arrayValues, $index, 1);
        }
    } elseif ($offset === null) {
        $this->nullValue = null;
        $this->nullValueIsSet = false;
    }
}