Passed
Pull Request — master (#161)
by
unknown
04:31
created

StubCommand::execute()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
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 8
rs 10
cc 1
nc 1
nop 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Zenstruck\Foundry\Bundle\Command;
6
7
use Symfony\Component\Console\Command\Command;
8
use Symfony\Component\Console\Input\InputInterface;
9
use Symfony\Component\Console\Output\OutputInterface;
10
use Symfony\Component\Console\Style\SymfonyStyle;
11
12
class StubCommand extends Command
13
{
14
    protected function execute(InputInterface $input, OutputInterface $output)
15
    {
16
        (new SymfonyStyle($input, $output))
17
            ->error(
18
                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')
19
            );
20
21
        return Command::SUCCESS;
22
    }
23
}
24