Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Nov 14, 2024
1 parent 017e44e commit e960f67
Show file tree
Hide file tree
Showing 34 changed files with 116 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/Console/CastMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function __construct(Filesystem $files)
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
#[\Override]
public function handle()
{
return $this->generateCode() ? self::SUCCESS : self::FAILURE;
Expand All @@ -46,6 +47,7 @@ public function handle()
* @param string $name
* @return string
*/
#[\Override]
protected function getPath($name)
{
return $this->getPathUsingCanvas($name);
Expand All @@ -56,6 +58,7 @@ protected function getPath($name)
*
* @return string
*/
#[\Override]
protected function rootNamespace()
{
return $this->rootNamespaceUsingCanvas();
Expand Down
3 changes: 3 additions & 0 deletions src/Console/ChannelMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function __construct(Filesystem $files)
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
#[\Override]
public function handle()
{
return $this->generateCode() ? self::SUCCESS : self::FAILURE;
Expand All @@ -48,6 +49,7 @@ public function handle()
* @param string $name
* @return string
*/
#[\Override]
protected function getPath($name)
{
return $this->getPathUsingCanvas($name);
Expand All @@ -58,6 +60,7 @@ protected function getPath($name)
*
* @return string
*/
#[\Override]
protected function rootNamespace()
{
return $this->rootNamespaceUsingCanvas();
Expand Down
2 changes: 2 additions & 0 deletions src/Console/CodeMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class CodeMakeCommand extends GeneratorCommand
*
* @return string
*/
#[\Override]
protected function getStub()
{
return $this->resolveStubPath('/stubs/class.stub');
Expand All @@ -43,6 +44,7 @@ protected function resolveDefaultStubPath($stub)
*
* @return array<int, array>
*/
#[\Override]
protected function getOptions()
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/Console/Commander.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ protected function resolveApplicationCallback()
*
* @return \Illuminate\Foundation\Application
*/
#[\Override]
public function laravel()
{
if (! $this->app instanceof LaravelApplication) {
Expand Down
4 changes: 4 additions & 0 deletions src/Console/ComponentMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function __construct(Filesystem $files)
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
#[\Override]
public function handle()
{
return $this->generateCode() ? self::SUCCESS : self::FAILURE;
Expand All @@ -58,6 +59,7 @@ public function afterCodeHasBeenGenerated(string $className, string $path): void
* @param string $name
* @return string
*/
#[\Override]
protected function getPath($name)
{
return $this->getPathUsingCanvas($name);
Expand All @@ -68,6 +70,7 @@ protected function getPath($name)
*
* @return string
*/
#[\Override]
protected function rootNamespace()
{
return $this->rootNamespaceUsingCanvas();
Expand All @@ -79,6 +82,7 @@ protected function rootNamespace()
* @param string $path
* @return string
*/
#[\Override]
protected function viewPath($path = '')
{
return $this->viewPathUsingCanvas($path);
Expand Down
4 changes: 4 additions & 0 deletions src/Console/ConsoleMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function __construct(Filesystem $files)
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
#[\Override]
public function handle()
{
return $this->generateCode() ? self::SUCCESS : self::FAILURE;
Expand All @@ -48,6 +49,7 @@ public function handle()
* @param string $name
* @return string
*/
#[\Override]
protected function getPath($name)
{
return $this->getPathUsingCanvas($name);
Expand All @@ -58,6 +60,7 @@ protected function getPath($name)
*
* @return string
*/
#[\Override]
protected function rootNamespace()
{
return $this->rootNamespaceUsingCanvas();
Expand All @@ -69,6 +72,7 @@ protected function rootNamespace()
* @param string $rootNamespace
* @return string
*/
#[\Override]
protected function getDefaultNamespace($rootNamespace)
{
return rtrim($this->generatorPreset()->commandNamespace(), '\\');
Expand Down
6 changes: 6 additions & 0 deletions src/Console/ControllerMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function __construct(Filesystem $files)
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
#[\Override]
public function handle()
{
return $this->generateCode() ? self::SUCCESS : self::FAILURE;
Expand All @@ -48,6 +49,7 @@ public function handle()
* @param string $model
* @return string
*/
#[\Override]
protected function qualifyModel(string $model)
{
return $this->qualifyModelUsingCanvas($model);
Expand All @@ -58,6 +60,7 @@ protected function qualifyModel(string $model)
*
* @return array
*/
#[\Override]
protected function buildParentReplacements()
{
$parentModelClass = $this->parseModel($this->option('parent'));
Expand Down Expand Up @@ -86,6 +89,7 @@ protected function buildParentReplacements()
* @param array $replace
* @return array
*/
#[\Override]
protected function buildModelReplacements(array $replace)
{
$modelClass = $this->parseModel($this->option('model'));
Expand Down Expand Up @@ -115,6 +119,7 @@ protected function buildModelReplacements(array $replace)
* @param string $name
* @return string
*/
#[\Override]
protected function getPath($name)
{
return $this->getPathUsingCanvas($name);
Expand All @@ -125,6 +130,7 @@ protected function getPath($name)
*
* @return string
*/
#[\Override]
protected function rootNamespace()
{
return $this->rootNamespaceUsingCanvas();
Expand Down
3 changes: 3 additions & 0 deletions src/Console/EventMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function __construct(Filesystem $files)
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
#[\Override]
public function handle()
{
return $this->generateCode() ? self::SUCCESS : self::FAILURE;
Expand All @@ -46,6 +47,7 @@ public function handle()
* @param string $name
* @return string
*/
#[\Override]
protected function getPath($name)
{
return $this->getPathUsingCanvas($name);
Expand All @@ -56,6 +58,7 @@ protected function getPath($name)
*
* @return string
*/
#[\Override]
protected function rootNamespace()
{
return $this->rootNamespaceUsingCanvas();
Expand Down
3 changes: 3 additions & 0 deletions src/Console/ExceptionMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function __construct(Filesystem $files)
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
#[\Override]
public function handle()
{
return $this->generateCode() ? self::SUCCESS : self::FAILURE;
Expand All @@ -46,6 +47,7 @@ public function handle()
* @param string $name
* @return string
*/
#[\Override]
protected function getPath($name)
{
return $this->getPathUsingCanvas($name);
Expand All @@ -56,6 +58,7 @@ protected function getPath($name)
*
* @return string
*/
#[\Override]
protected function rootNamespace()
{
return $this->rootNamespaceUsingCanvas();
Expand Down
6 changes: 6 additions & 0 deletions src/Console/FactoryMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function __construct(Filesystem $files)
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
#[\Override]
public function handle()
{
return $this->generateCode() ? self::SUCCESS : self::FAILURE;
Expand All @@ -59,6 +60,7 @@ protected function resolveDefaultStubPath($stub)
* @param string $name
* @return string
*/
#[\Override]
protected function getNamespace($name)
{
return rtrim($this->generatorPreset()->factoryNamespace(), '\\');
Expand All @@ -78,6 +80,7 @@ protected function getGeneratorSourcePath(): string
* @param string $name
* @return string
*/
#[\Override]
protected function guessModelName($name)
{
if (str_ends_with($name, 'Factory')) {
Expand All @@ -93,6 +96,7 @@ protected function guessModelName($name)
* @param string $name
* @return string
*/
#[\Override]
protected function getPath($name)
{
return $this->getPathUsingCanvas($name);
Expand All @@ -103,6 +107,7 @@ protected function getPath($name)
*
* @return string
*/
#[\Override]
protected function rootNamespace()
{
return $this->rootNamespaceUsingCanvas();
Expand All @@ -113,6 +118,7 @@ protected function rootNamespace()
*
* @return string|null
*/
#[\Override]
protected function userProviderModel()
{
return $this->userProviderModelUsingCanvas();
Expand Down
1 change: 1 addition & 0 deletions src/Console/FailedTableCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public function __construct(Filesystem $files, Composer $composer)
* @param string $table
* @return string
*/
#[\Override]
protected function createBaseMigration($table = 'failed_jobs')
{
return $this->createBaseMigrationUsingCanvas($table);
Expand Down
4 changes: 4 additions & 0 deletions src/Console/GeneratorMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GeneratorMakeCommand extends GeneratorCommand
* @param string $name
* @return string
*/
#[\Override]
protected function replaceClass($stub, $name)
{
$stub = parent::replaceClass($stub, $name);
Expand All @@ -42,6 +43,7 @@ protected function replaceClass($stub, $name)
*
* @return string
*/
#[\Override]
protected function getStub()
{
return $this->resolveStubPath('/stubs/generator.stub');
Expand All @@ -64,6 +66,7 @@ protected function resolveDefaultStubPath($stub)
* @param string $rootNamespace
* @return string
*/
#[\Override]
protected function getDefaultNamespace($rootNamespace)
{
return rtrim($this->generatorPreset()->commandNamespace(), '\\');
Expand All @@ -74,6 +77,7 @@ protected function getDefaultNamespace($rootNamespace)
*
* @return array<int, array>
*/
#[\Override]
protected function getOptions()
{
return [
Expand Down
3 changes: 3 additions & 0 deletions src/Console/JobMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function __construct(Filesystem $files)
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
#[\Override]
public function handle()
{
return $this->generateCode() ? self::SUCCESS : self::FAILURE;
Expand All @@ -48,6 +49,7 @@ public function handle()
* @param string $name
* @return string
*/
#[\Override]
protected function getPath($name)
{
return $this->getPathUsingCanvas($name);
Expand All @@ -58,6 +60,7 @@ protected function getPath($name)
*
* @return string
*/
#[\Override]
protected function rootNamespace()
{
return $this->rootNamespaceUsingCanvas();
Expand Down
3 changes: 3 additions & 0 deletions src/Console/ListenerMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function __construct(Filesystem $files)
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
#[\Override]
public function handle()
{
return $this->generateCode() ? self::SUCCESS : self::FAILURE;
Expand All @@ -48,6 +49,7 @@ public function handle()
* @param string $name
* @return string
*/
#[\Override]
protected function getPath($name)
{
return $this->getPathUsingCanvas($name);
Expand All @@ -58,6 +60,7 @@ protected function getPath($name)
*
* @return string
*/
#[\Override]
protected function rootNamespace()
{
return $this->rootNamespaceUsingCanvas();
Expand Down
3 changes: 3 additions & 0 deletions src/Console/MailMakeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public function __construct(Filesystem $files)
*
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException
*/
#[\Override]
public function handle()
{
return $this->generateCode() ? self::SUCCESS : self::FAILURE;
Expand All @@ -58,6 +59,7 @@ public function afterCodeHasBeenGenerated(string $className, string $path): void
* @param string $name
* @return string
*/
#[\Override]
protected function getPath($name)
{
return $this->getPathUsingCanvas($name);
Expand All @@ -68,6 +70,7 @@ protected function getPath($name)
*
* @return string
*/
#[\Override]
protected function rootNamespace()
{
return $this->rootNamespaceUsingCanvas();
Expand Down
Loading

0 comments on commit e960f67

Please sign in to comment.