{@inheritdoc}

@param string $key
@param mixed  $steps

@return int|bool
17905
public function decrement($key, $steps = 1)
    {
        $previous = $this->has($key) ? $this->get($key) : 0;
        $previous -= $steps;
        $this->put($key, $previous);

        return $previous;
    }
807154
public function inc($key, $step = 1, &$success = null)
	{
		$oldVal = (int)$this->fetch($key);
		$this->data[$key][0] = $oldVal + $step;
		$success = true;

		return $this->data[$key][0];
	}
391901
protected function redirectToStep( $step )
    {
        $routeMatch = $this->getEvent()
                           ->getRouteMatch();

        return $this->redirect()
                    ->toRoute( $routeMatch->getMatchedRouteName(),
                               ArrayUtils::merge(
                                   $routeMatch->getParams(),
                                   array( 'step' => $step )
                               ) );
    }
951562
public function decrement(string $key, int $step = 1): int {
		return $this->driver->decrement($key, abs($step));
	}
679945
private function canOmitKey($key, & $nextIndex)
    {
        $result = $key === $nextIndex;

        if (\is_int($key)) {
            $nextIndex = max($key + 1, $nextIndex);
        }

        return $result;
    }
7985
public function increment($key, $step = 1)
    {
        $success = false;

        return wincache_ucache_inc($this->prefixKey . $key, $step, $success);
    }
744539
public function decrement(string $key, int $step = 1): int {
		return $this->increment($key, $step * -1);
	}
668969
final public function __isset($key)
	{
		return	array_key_exists($key, $this->_stack) && isset($this->_stack[$key]);
	}
676260
public function step($step = null)
    {
        if (isset($step)) {
            $this->step = $step;
            return $this;
        } else {
            return $this->step;
        }
    }
317724
protected function &resolveKey($key)
    {
        // check if the key is a compound key
        if (strpos($key, '.') !== false) {

            // key is compound, so split it into parts
            $parts = explode('.', $key);
            $config = &$this->config;

            // recurse into the config array using the key parts
            while (is_array($config) && ($part = array_shift($parts)) !== null) {
                if (!isset($config[$part]) && array_key_exists($part, $config)) {
                    throw new KeyDoesNotExistException($key);
                }
                $config = &$config[$part];
            }

            // if there are still key parts left, then the key doesn't exist
            if (count($parts) > 0) {
                throw new KeyDoesNotExistException($key);
            }

        } else {

            // key is not compound, so just check if it exists and get value
            if (!isset($this->config[$key]) && !array_key_exists($key, $this->config)) {
                throw new KeyDoesNotExistException($key);
            }
            $config = &$this->config[$key];

        }

        return $config;
    }
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);
    }
1183390
protected function trySteps(array $steps)
    {
        foreach ($steps as $step) {
            // Run each step and return if there's a result
            if ($result = $this->$step()) {
                return $result;
            }
        }

        return null;
    }
45590
public function increment(string $key, int $step = 1): int {
		return $this->driver->increment($key, abs($step));
	}
1282818
public function canReachStep($stepName)
    {
        if (!array_key_exists($stepName, $this->canReachStep)) {

            $this->canReachStep[$stepName] = false;
            $this->validationErrors[$stepName] = array();

            if ($stepName != $this->getCurrentStepName()) {
                $stepToReach = $this->getStep($stepName);
                $currentStep = $this->getCurrentStep();

                if ($currentStep->hasPossibleNextStep($stepToReach->getName())) {

                    $preValidationResult = $this->preValidation($stepToReach->getName());

                    if ($preValidationResult) {
                        if (!$stepToReach->hasValidations()) {
                            $this->canReachStep[$stepToReach->getName()] = true;
                        } else {
                            foreach ($stepToReach->getValidations() as $validation) {
                                $validation = $this->getValidation($validation);

                                try {
                                    $validation->validate($this->getModel());
                                    $this->canReachStep[$stepToReach->getName()] = true;
                                } catch (ValidationException $e) {
                                    $this->validationErrors[$stepToReach->getName()][] = $e->getMessage();
                                    $this->canReachStep[$stepToReach->getName()] = false;
                                }
                            }
                        }
                    }
                }
            }
        }

        return $this->canReachStep[$stepName];
    }
227231
public function calculateStepWidth(StepNode $step, $indentation)
    {
        $indentText = str_repeat(' ', intval($indentation));

        $text = sprintf('%s%s %s', $indentText, $step->getKeyword(), $step->getText());

        return mb_strlen($text, 'utf8');
    }
32808
public function decrement($key, $step = 1)
    {
        $success = false;

        return wincache_ucache_dec($this->prefixKey . $key, $step, $success);
    }
565335
protected function create($step)
    {
        foreach (array('names', 'identifier') as $key) {
            if (!isset($step->dsl[$key])) {
                throw new \Exception("The '$key' key is missing in a object state group creation definition");
            }
        }

        $objectStateService = $this->repository->getObjectStateService();

        $objectStateGroupIdentifier = $this->referenceResolver->resolveReference($step->dsl['identifier']);
        $objectStateGroupCreateStruct = $objectStateService->newObjectStateGroupCreateStruct($objectStateGroupIdentifier);
        $objectStateGroupCreateStruct->defaultLanguageCode = $this->getLanguageCode($step); // was: self::DEFAULT_LANGUAGE_CODE;

        foreach ($step->dsl['names'] as $languageCode => $name) {
            $objectStateGroupCreateStruct->names[$languageCode] = $name;
        }
        if (isset($step->dsl['descriptions'])) {
            foreach ($step->dsl['descriptions'] as $languageCode => $description) {
                $objectStateGroupCreateStruct->descriptions[$languageCode] = $description;
            }
        }

        $objectStateGroup = $objectStateService->createObjectStateGroup($objectStateGroupCreateStruct);

        $this->setReferences($objectStateGroup, $step);

        return $objectStateGroup;
    }