Passed
Push — master ( d1fc25...6001e7 )
by Kevin
03:00
created

StubCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 9
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Zenstruck\Foundry\Bundle\Command;
4
5
use Symfony\Component\Console\Command\Command;
6
use Symfony\Component\Console\Input\InputInterface;
7
use Symfony\Component\Console\Output\OutputInterface;
8
use Symfony\Component\Console\Style\SymfonyStyle;
9
10
abstract class StubCommand extends Command
11
{
12
    protected function execute(InputInterface $input, OutputInterface $output)
13
    {
14
        (new SymfonyStyle($input, $output))
15
            ->error(
16
                \sprintf("To run \"%s\" you need the \"%s\" which is currently not installed.\n\nTry running \"composer require %s\".", static::$defaultName, 'MakerBundle', 'symfony/maker-bundle --dev')
17
            )
18
        ;
19
20
        return Command::SUCCESS;
21
    }
22
}
23