Issues (24)

src/Console/Command/DialogTrait.php (1 issue)

Labels
Severity
1
<?php declare(strict_types=1);
2
/**
3
 * This file is part of the daikon-cqrs/boot project.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace Daikon\Boot\Console\Command;
10
11
use Symfony\Component\Console\Input\InputInterface;
12
use Symfony\Component\Console\Output\OutputInterface;
13
use Symfony\Component\Console\Question\ConfirmationQuestion;
14
15
trait DialogTrait
16
{
17
    protected function confirm(InputInterface $input, OutputInterface $output): bool
18
    {
19
        $helper = $this->getHelper('question');
0 ignored issues
show
It seems like getHelper() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
        /** @scrutinizer ignore-call */ 
20
        $helper = $this->getHelper('question');
Loading history...
20
        $question = new ConfirmationQuestion('Are you sure? [y\N]: ', false);
21
        return $helper->ask($input, $output, $question);
22
    }
23
}
24