protected function formatStub($stub, array $replacement)
    {
        foreach ($replacement as $src => $dest) {
            $stub = str_replace($src, $dest, $stub);
        }
        return $stub;
    }