Completed
Push — master ( 0d17ec...34df22 )
by Yaro
02:05
created

BlueprintCreate   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 7 1
1
<?php
2
3
namespace Yaro\ApiDocs\Commands;
4
5
use Illuminate\Console\Command;
6
7
class BlueprintCreate extends Command
8
{
9
    protected $signature = 'apidocs:blueprint-create {name?} {--disc=}';
10
11
    protected $description = 'Create a new Blueprint API file.';
12
13
    public function handle()
14
    {
15
        $apiDocs = app()->make('yaro.apidocs');
16
        $snapshotName = $apiDocs->blueprint()->create((string) $this->argument('name'), (string) $this->option('disc'));
17
18
        $this->info(sprintf('New blueprint snapshot [%s] created successfully.', $snapshotName));
19
    }
20
}
21