/** * Step2: Converts the token of the matched range. * * @param int $i * @param string $match * @param array $matches * @param string|null $special * @param string|null $replace */ protected function matchRangeTokenStep2($i, $match, array &$matches, &$special, &$replace) { if (' ' === $match) { $matches[$i] = ','; } elseif ('||' === $match) { $matches[$i] = '|'; } elseif (in_array($special, array('^'))) { $matches[$i] = SemverRangeUtil::replaceSpecialRange($this, $match); $special = null; } else { $match = '~' === $special ? str_replace(array('*', 'x', 'X'), '0', $match) : $match; $matches[$i] = $this->convertVersion($match); $matches[$i] = $replace ? SemverUtil::replaceAlias($matches[$i], $replace) : $matches[$i]; $special = null; $replace = null; } }
/** * Step3: Converts the token of the matched range. * * @param int $i * @param string $match * @param array $matches * @param string|null $special * @param string|null $replace */ protected function matchRangeTokenStep3($i, $match, array &$matches, &$special, &$replace) { if (' ' === $match) { $matches[$i] = ','; } elseif ('||' === $match) { $matches[$i] = '|'; } elseif (in_array($special, array('^'))) { $matches[$i] = SemverRangeUtil::replaceSpecialRange($this, $match); $special = null; } else { $this->matchRangeTokenStep4($i, $match, $matches, $special, $replace); } }