MakeRequestCommand   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A execute() 0 14 1
1
<?php
2
3
namespace MojtabaGheytasi\RequestValidatorBundle\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
class MakeRequestCommand extends Command
11
{
12
    protected static $defaultName = 'make:request';
13
14
    protected function execute(InputInterface $input, OutputInterface $output): int
15
    {
16
        (new SymfonyStyle($input, $output))
17
            ->error(
18
                sprintf(
19
                    "To run \"%s\" you need the \"%s\" which is currently not installed.\n\nTry running \"composer require %s\".",
20
                    static::$defaultName,
21
                    'MakerBundle',
22
                    'symfony/maker-bundle --dev'
23
                )
24
            )
25
        ;
26
27
        return Command::SUCCESS;
28
    }
29
}
30