We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.
| 1 | <?php |
||
| 7 | class ModelBackpackCommand extends GeneratorCommand |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * The console command name. |
||
| 11 | * |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | protected $name = 'backpack:model'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The name and signature of the console command. |
||
| 18 | * |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $signature = 'backpack:model |
||
| 22 | {name : Name of the model} |
||
| 23 | {--softdelete : Add soft deletes to the model} |
||
| 24 | {--nomigration : Disables creating of the migration file}'; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * The console command description. |
||
| 28 | * |
||
| 29 | * @var string |
||
| 30 | */ |
||
| 31 | protected $description = 'Generate a backpack templated model and migration'; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * The type of class being generated. |
||
| 35 | * |
||
| 36 | * @var string |
||
| 37 | */ |
||
| 38 | protected $type = 'Model'; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Get the stub file for the generator. |
||
| 42 | * |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | protected function getStub() |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Get the default namespace for the class. |
||
| 56 | * |
||
| 57 | * @param string $rootNamespace |
||
| 58 | * |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | protected function getDefaultNamespace($rootNamespace) |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Replace the table name for the given stub. |
||
| 68 | * |
||
| 69 | * @param string $stub |
||
| 70 | * @param string $name |
||
| 71 | * |
||
| 72 | * @return string |
||
|
|
|||
| 73 | */ |
||
| 74 | protected function replaceTable(&$stub, $name) |
||
| 82 | |||
| 83 | /** |
||
| 84 | * Build the class with the given name. |
||
| 85 | * |
||
| 86 | * @param string $name |
||
| 87 | * |
||
| 88 | * @return string |
||
| 89 | */ |
||
| 90 | protected function buildClass($name) |
||
| 96 | |||
| 97 | /** |
||
| 98 | * Get the console command options. |
||
| 99 | * |
||
| 100 | * @return array |
||
| 101 | */ |
||
| 102 | protected function getOptions() |
||
| 108 | |||
| 109 | protected function buildMigration($name) |
||
| 123 | |||
| 124 | public function handle() |
||
| 132 | } |
||
| 133 |
This check compares the return type specified in the
@returnannotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.