-
-
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.
Signed-off-by: Mior Muhammad Zaki <[email protected]>
- Loading branch information
Showing
38 changed files
with
700 additions
and
1,730 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
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,11 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Call to an undefined method Illuminate\\\\Contracts\\\\Container\\\\Container\\:\\:basePath\\(\\)\\.$#" | ||
message: "#^Cannot access offset 'path' on Illuminate\\\\Contracts\\\\Foundation\\\\Application\\.$#" | ||
count: 1 | ||
path: src/LaravelServiceProvider.php | ||
path: src/Commands/GeneratorCommand.php | ||
|
||
- | ||
message: "#^Method Orchestra\\\\Canvas\\\\Core\\\\Presets\\\\Preset\\:\\:config\\(\\) has no return type specified\\.$#" | ||
message: "#^Parameter \\#1 \\$app of class Orchestra\\\\Canvas\\\\Core\\\\Presets\\\\Laravel constructor expects Illuminate\\\\Contracts\\\\Foundation\\\\Application, Illuminate\\\\Contracts\\\\Container\\\\Container given\\.$#" | ||
count: 1 | ||
path: src/Presets/Preset.php | ||
path: src/PresetManager.php |
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 was deleted.
Oops, something went wrong.
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; | ||
} | ||
|
||
/** | ||
* 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.
Oops, something went wrong.