stubsToRename() as $stub) { (new Filesystem)->move($stub, str_replace('.stub', '.php', $stub)); } } /** * Get the array of stubs that need PHP file extensions. * * @return array */ abstract protected function stubsToRename(); }