Completed
Push — master ( 3e25f8...e7bd0a )
by Sergi Tur
02:09
created

SocialCommand::getPackageName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
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
     *
45
     * @return void
46
     */
47
    protected function execute(InputInterface $input, OutputInterface $output)
48
    {
49
        $llum = $this->findLlum();
50
        $package = $this->getPackageName();
51
        $output->writeln('<info>'.$llum.' package '.$this->getDevOption()." $package".'</info>');
52
        passthru($llum.' package '.$this->getDevOption().' '.$package);
53
    }
54
55
    /**
56
     * Get llum package name.
57
     */
58
    protected function getPackageName()
59
    {
60
        return 'laravel-social';
61
    }
62
}
63