ElfSundae /
laravel-api
| 1 | <?php |
||
| 2 | |||
| 3 | namespace ElfSundae\Laravel\Api\Console; |
||
| 4 | |||
| 5 | use Illuminate\Console\Command; |
||
|
0 ignored issues
–
show
|
|||
| 6 | use ElfSundae\Laravel\Api\Token; |
||
| 7 | |||
| 8 | class GenerateTokenCommand extends Command |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The name and signature of the console command. |
||
| 12 | * |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $signature = 'api:token {app key}'; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * The console command description. |
||
| 19 | * |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected $description = 'Generate an api token.'; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Execute the console command. |
||
| 26 | * |
||
| 27 | * @return void |
||
| 28 | */ |
||
| 29 | public function handle() |
||
| 30 | { |
||
| 31 | $token = $this->laravel->make(Token::class); |
||
| 32 | |||
| 33 | $key = $this->argument('app key'); |
||
| 34 | |||
| 35 | if ($data = $token->generateDataForKey($key)) { |
||
| 36 | $this->table(array_keys($data), [array_values($data)]); |
||
| 37 | } else { |
||
| 38 | $this->error('Invalid app key: '.$key); |
||
| 39 | } |
||
| 40 | } |
||
| 41 | } |
||
| 42 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths