Completed
Push — master ( 1680b9...7d3d6e )
by Mohamed
15s queued 11s
created

WidgetMakeCommand::getOptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Microboard\Commands;
4
5
use Arrilot\Widgets\Console\WidgetMakeCommand as Command;
6
use Illuminate\Contracts\Container\BindingResolutionException;
7
use Symfony\Component\Console\Input\InputOption;
8
9
class WidgetMakeCommand extends Command
10
{
11
    /**
12
     * Get the stub file for the generator.
13
     *
14
     * @return string
15
     * @throws BindingResolutionException
16
     */
17
    protected function getStub()
18
    {
19
        $stubPath = $this->laravel->make('config')->get('laravel-widgets.widget.stub');
20
21
        if (is_null($stubPath)) {
22
            return __DIR__ . '/../../stubs/widget.stub';
23
        }
24
25
        return $this->laravel->basePath() . '/' . $stubPath;
26
    }
27
28
    /**
29
     * Get the console command options.
30
     *
31
     * @return array
32
     */
33
    protected function getOptions()
34
    {
35
        return [
36
            ['plain', '', InputOption::VALUE_OPTIONAL, 'Use plain stub. No view is being created too.', true],
37
        ];
38
    }
39
}
40