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

StubCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 10
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 8 1
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