¨4.0.1¨

This commit is contained in:
¨NW¨
2023-12-03 14:07:47 +00:00
parent c08b36d1b6
commit f35052522d
1112 changed files with 43019 additions and 24987 deletions

View File

@@ -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));