This class seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate
the same code in three or more different places, we strongly encourage you to
look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.
Loading history...
15
{
16
/**
17
* {@inheritDoc}
18
*/
19
protected function configure()
20
{
21
parent::configure();
22
23
$this
24
->setName('doctrine:schema:create')
25
->setDescription('Executes (or dumps) the SQL needed to generate the database schema')
26
->addOption('em', null, InputOption::VALUE_OPTIONAL, 'The entity manager to use for this command');
27
}
28
29
/**
30
* {@inheritDoc}
31
*/
32
protected function execute(InputInterface $input, OutputInterface $output)
$this->getApplication() is of type null|object<Symfony\Comp...nt\Console\Application>, but the function expects a object<Symfony\Bundle\Fr...le\Console\Application>.
It seems like the type of the argument is not accepted by the function/method
which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this
might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example:
functionacceptsInteger($int){}$x='123';// string "123"// Instead ofacceptsInteger($x);// we recommend to useacceptsInteger((integer)$x);
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.
You can also find more detailed suggestions in the “Code” section of your repository.