Decrement the value of the storage.

@param string   $name The name of the item in store.
@param int|null $step The value to decrement, must be an integer.

@author : evalor <master@evalor.cn>

@return bool|int
498699
public function dec($name, $step = 1)
    {
        if (is_null($step)) {
            $step = 1;
        }
        $key   = $this->getCacheKey($name);
        $value = self::$instance->get($key) - $step;

        return self::$instance->set($key, $value);
    }
657533
public function increment($key, $step = 1)
    {
        $success = false;
        apcu_inc($this->prefixKey . $key, $step, $success);

        return $success;
    }
134096
public function decrement($key, $offset = 1)
    {
        $key = $this->_key($key);

        return apcu_dec($key, $offset);
    }
951562
public function decrement(string $key, int $step = 1): int {
		return $this->driver->decrement($key, abs($step));
	}
250013
public function dec($field, $step = 1)
    {
        $fields = is_string($field) ? explode(',', $field) : $field;
        foreach ($fields as $field) {
            $this->data($field, ['exp', $field . '-' . $step]);
        }
        return $this;
    }
318840
public function get_last_step_with_qt_var($name) {
        foreach ($this->get_reverse_step_iterator() as $step) {
            if ($step->has_qt_var($name)) {
                return $step;
            }
        }
        return new question_attempt_step_read_only();
    }
1272494
public function removeChild(Step $step)
    {
        if ($this->children->contains($step)) {
            $this->children->removeElement($step);
            $step->setParent(null);
        }

        return $this;
    }
1048484
public function delValue($name)
    {
        $value = null;

        if ($this->hasConfig($name)) {
            $value = $this->getValue($name);

            unset($this->config[$name]);
        }

        return $value;
    }
178026
public function push($name) {
		$this->validateName($name);
		$obj = $this->preserveInstance ? $this : clone $this;
		$args = func_get_args();
		array_shift($args);
		if (empty($args))
			return 0;
		
		if (!array_key_exists($name, $obj->config))
			$obj->config[$name] = $args;
		else {
			if (!is_array($obj->config[$name]))
				$obj->config[$name] = [$obj->config[$name]];
			
			foreach($args as $arg)
				$obj->config[$name][] = $arg; //faster than array_push
		}
		
		return $obj;
	}
635824
public function dec($key, $step = 1) {
        X::logger()->trace("RCache dec '$key' by $step");
        if ($step > 1) {
            return $this->cache->decrBy($key, $step);
        }

        return $this->cache->decr($key);
    }
231652
public function decrement($table, $column, $step = 1)
    {
        $this->queryBuilder->decrement($table, $column, $step);
        return $this;
    }
499336
public function increment($key, $step = 1)
    {
        if (!$this->enabled)
            return false;

        $has_replaced = $has_set = false;
        try {
            // Store the cache object
            $nKey = $this->key($key);
            $has_replaced = @$this->getConnection()->add($nKey, $step, 0);
            if (!$has_replaced) {
                $has_set = @$this->getConnection()->increment($nKey, $step);
            }

        } catch (Exception $e) {
            throw new CacheException($e->getMessage(), $e->getCode());
        }

        $this->Logger->debug("". (($has_replaced || $has_set) ? "Successfully" : "Failed to") . " increment key '{$key}'\n");
//        $this->Logger->debug($data);

        return $has_replaced ? $step : $has_set;
    }
1010337
public function pop($name)
    {
        $previousValue = $this->get($name);

        $value = array_pop($previousValue);

        $this->create($name, $previousValue);

        return $value;
    }
1351518
public function isPropertyValueEmpty($name)
	{
		$value = $this->getBlockExecutionContext()
				->controller->getProperty($name)->getValue();

		return empty($value);
	}
939288
public function decrement($key, $value = 1)
    {
        $this->store->decrement($this->taggedItemKey($key), $value);
    }
514192
public function inc(string $name, int $step = 1)
    {
        $this->writeTimes++;

        $key = $this->getCacheKey($name);

        if ($this->handler->get($key)) {
            return $this->handler->increment($key, $step);
        }

        return $this->handler->set($key, $step);
    }
383697
final public function decrementColumnByPk($pk, $column, $step = 1, $table = null)
    {
        return $this->db->decrement($this->getTable($table), $column, $step)
                        ->whereEquals($this->getPk(), $pk)
                        ->execute();
    }