protected function processRoutesGroup(&$stub, $prefix, $namespace)
    {
        $prefix = trim($prefix);

        if (!empty($prefix) || !empty($namespace)) {
            $groupStub = $this->getStubContent('routes-group');

            $this->replacePrefix($groupStub, $this->getGroupPrefix($prefix))
                ->replaceRoutes($groupStub, $stub);

            $stub = $groupStub;
        }

        return $this;
    }