protected function substitutePlaceholderNames(array $matches) { foreach ($this->placeholders as $placeholder => $name) { if (isset($matches[$placeholder])) { $matches[$name] = $matches[$placeholder]; unset($matches[$placeholder]); } } return $matches; }