| Conditions | 3 |
| Paths | 8 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 5 | public function handle() |
|
| 42 | { |
||
| 43 | try { |
||
| 44 | 5 | if (!($scopeId = $this->argument('id'))) { |
|
| 45 | 1 | $scopeId = $this->ask('Enter scope ID'); |
|
| 46 | } |
||
| 47 | |||
| 48 | 5 | $this->scopes->forceCreate(['id' => $scopeId]); |
|
| 49 | 4 | $this->info('Scope created succesfully!'); |
|
| 50 | 2 | } catch (Exception $e) { |
|
| 51 | 2 | $this->error("An error occurred: {$e->getMessage()}"); |
|
| 52 | 2 | return 1; |
|
| 53 | } |
||
| 54 | 4 | } |
|
| 55 | } |
||
| 56 |