Completed
Push — master ( e0759a...dc0dc9 )
by Sergi Tur
04:57
created

SocialCommand::initialize()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 2
1
<?php
2
3
namespace Acacha\AdminLTETemplateLaravel\Console;
4
5
use Symfony\Component\Console\Input\InputInterface;
6
use Symfony\Component\Console\Output\OutputInterface;
7
8
/**
9
 * Class SocialCommand.
10
 */
11
class SocialCommand extends BaseCommand
12
{
13
    /**
14
     * Initialize command.
15
     *
16
     * @param InputInterface  $input
17
     * @param OutputInterface $output
18
     */
19
    protected function initialize(InputInterface $input, OutputInterface $output)
20
    {
21
        parent::initialize($input, $output);
22
23
        if ($input->hasOption('dev')) {
24
            $this->installDev = $input->getOption('dev');
25
        }
26
    }
27
28
    /**
29
     * Configure the command options.
30
     */
31
    protected function configure()
32
    {
33
        $this->ignoreValidationErrors();
34
35
        $this->setName('social')
36
            ->setDescription('Add OAuth social login/register support using Socialiate into the current project.');
37
    }
38
39
    /**
40
     * Execute the command.
41
     *
42
     * @param InputInterface $input
43
     * @param OutputInterface $output
44
     * @return void
45
     */
46
    protected function execute(InputInterface $input, OutputInterface $output)
47
    {
48
        $llum = $this->findLlum();
49
        $package = $this->getPackageName();
50
        $output->writeln('<info>'.$llum.' package '.$this->getDevOption()." $package".'</info>');
51
        passthru($llum.' package '.$this->getDevOption().' '.$package);
52
    }
53
54
}
55