protected function getMatchedParameters(array $matches): array
    {
        $parameters = [];
        foreach ($matches as $key => $match) {
            if (is_string($key)) {
                $parameters[$key] = $match[0];
            }
        }

        return array_replace_recursive($this->getParameters(), $parameters);
    }
protected function getMatchedParameters(array $matches): array
    {
        $parameters = [];
        foreach ($matches as $key => $match) {
            if (is_string($key)) {
                $parameters[$key] = $match[0];
            }
        }

        return array_replace_recursive($this->getParameters(), $parameters);
    }
protected function getMatchedParameters ( array $ matches ) : array { $ parameters = [ ] ; foreach ( $ matches as $ key => $ match ) { if ( is_string ( $ key ) ) { $ parameters [ $ key ] = $ match [ 0 ] ; } } return array_replace_recursive ( $ this -> getParameters ( ) , $ parameters ) ; }
Get the parameters when the route is matched.

The $matches will be filtered for integer keys and merged into the default parameters.

@param array $matches
@return array
Get the parameters when the route is matched .