¨4.0.1¨
This commit is contained in:
@@ -9,10 +9,12 @@ class FilesGenerator extends Generator
|
||||
/**
|
||||
* Generate the given files.
|
||||
*
|
||||
* @param array $files
|
||||
* @param array $files
|
||||
*
|
||||
* @return void
|
||||
* @throws FileNotFoundException
|
||||
*/
|
||||
public function generate(array $files)
|
||||
public function generate(array $files): void
|
||||
{
|
||||
foreach ($files as $stub => $file) {
|
||||
$this->finder->put(
|
||||
@@ -22,30 +24,32 @@ class FilesGenerator extends Generator
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Generate the base module service provider.
|
||||
*
|
||||
* @return $this
|
||||
* @return void
|
||||
* @throws FileNotFoundException
|
||||
*/
|
||||
public function generateModuleProvider()
|
||||
public function generateModuleServiceProvider(): void
|
||||
{
|
||||
$this->finder->put(
|
||||
$this->getModulesPath("Providers/{$this->name}ServiceProvider.php"),
|
||||
$this->getContentFor('providers/module-service-provider.stub')
|
||||
);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the content for the given file.
|
||||
*
|
||||
* @param string $stub
|
||||
*
|
||||
* @return string
|
||||
*
|
||||
* @throws FileNotFoundException
|
||||
*/
|
||||
private function getContentFor($stub)
|
||||
private function getContentFor(string $stub): string
|
||||
{
|
||||
$stub = $this->finder->get($this->getStubPath($stub));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user