-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'illuminate-console' into illuminate-console-8
Signed-off-by: Mior Muhammad Zaki <[email protected]>
- Loading branch information
Showing
32 changed files
with
693 additions
and
1,519 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Call to an undefined method Illuminate\\\\Contracts\\\\Container\\\\Container\\:\\:basePath\\(\\)\\.$#" | ||
count: 1 | ||
path: src/LaravelServiceProvider.php | ||
|
||
- | ||
message: "#^Method Orchestra\\\\Canvas\\\\Core\\\\Presets\\\\Preset\\:\\:config\\(\\) has no return type specified\\.$#" | ||
count: 1 | ||
path: src/Presets/Preset.php |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
<?php | ||
|
||
namespace Orchestra\Canvas\Core\Commands; | ||
|
||
use Illuminate\Filesystem\Filesystem; | ||
use Orchestra\Canvas\Core\Concerns; | ||
use Orchestra\Canvas\Core\Contracts\GeneratesCode; | ||
|
||
/** | ||
* @property string|null $name | ||
* @property string|null $description | ||
*/ | ||
abstract class GeneratorCommand extends \Illuminate\Console\GeneratorCommand implements GeneratesCode | ||
{ | ||
use Concerns\CodeGenerator; | ||
use Concerns\TestGenerator; | ||
use Concerns\UsesGeneratorOverrides; | ||
|
||
/** | ||
* Create a new controller creator command instance. | ||
* | ||
* @return void | ||
*/ | ||
public function __construct(Filesystem $files) | ||
{ | ||
parent::__construct($files); | ||
|
||
$this->addGeneratorPresetOptions(); | ||
} | ||
|
||
/** | ||
* Execute the console command. | ||
* | ||
* @return bool|null | ||
* | ||
* @throws \Illuminate\Contracts\Filesystem\FileNotFoundException | ||
*/ | ||
public function handle() | ||
{ | ||
return $this->generateCode() ? self::SUCCESS : self::FAILURE; | ||
Check failure on line 40 in src/Commands/GeneratorCommand.php GitHub Actions / PHP8.1 on ubuntu-latest (highest)
|
||
} | ||
|
||
/** | ||
* Get the destination class path. | ||
* | ||
* @param string $name | ||
* @return string | ||
*/ | ||
protected function getPath($name) | ||
{ | ||
return $this->getPathUsingCanvas($name); | ||
} | ||
|
||
/** | ||
* Qualify the given model class base name. | ||
* | ||
* @return string | ||
*/ | ||
protected function qualifyModel(string $model) | ||
{ | ||
return $this->qualifyModelUsingCanvas($model); | ||
} | ||
|
||
/** | ||
* Get the root namespace for the class. | ||
* | ||
* @return string | ||
*/ | ||
protected function rootNamespace() | ||
{ | ||
return $this->rootNamespaceUsingCanvas(); | ||
} | ||
|
||
/** | ||
* Get the model for the default guard's user provider. | ||
*/ | ||
protected function userProviderModel(): ?string | ||
{ | ||
return $this->userProviderModelUsingCanvas(); | ||
} | ||
|
||
/** | ||
* Get the first view directory path from the application configuration. | ||
* | ||
* @return string | ||
*/ | ||
protected function viewPath($path = '') | ||
{ | ||
return $this->viewPathUsingCanvas($path); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.