The class Symfony\Bundle\Framework...d\ContainerAwareCommand has been deprecated: since Symfony 4.2, use {@see Command} instead.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated annotation
12
abstract class AbstractCommand extends /** @scrutinizer ignore-deprecated */ ContainerAwareCommand
Loading history...
13
{
14
/**
15
* @var InputInterface
16
*/
17
protected $input;
18
19
/**
20
* @var OutputInterface
21
*/
22
protected $output;
23
24
/**
25
* {@inheritdoc}
26
*/
27
3
protected function configure()
28
{
29
3
$this->addArgument(
30
3
'id',
31
3
InputArgument::REQUIRED,
32
3
'Subscription ID'
33
);
34
3
}
35
36
/**
37
* {@inheritdoc}
38
*/
39
3
protected function execute(InputInterface $input, OutputInterface $output)
It seems like $subscriptionId can also be of type string[]; however, parameter $args of sprintf() does only seem to accept string, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
49
return $output->writeln(sprintf('<error>The subscription with ID "%s" was not found.</error>', /** @scrutinizer ignore-type */ $subscriptionId));
Loading history...
50
}
51
52
// Execute the action
53
3
$this->action($subscription);
54
55
3
$output->writeln('<green>Finished.</green>');
56
3
}
57
58
/**
59
* Action to execute when
60
*
61
* @param SubscriptionInterface $subscription
62
*
63
* @return void
64
*/
65
abstract protected function action(SubscriptionInterface $subscription);