1 | <?php |
||||
2 | |||||
3 | /* |
||||
4 | * This file is part of the AntiMattr MongoDB Migrations Bundle, a library by Matthew Fitzgerald. |
||||
5 | * |
||||
6 | * (c) 2014 Matthew Fitzgerald |
||||
7 | * |
||||
8 | * For the full copyright and license information, please view the LICENSE |
||||
9 | * file that was distributed with this source code. |
||||
10 | */ |
||||
11 | |||||
12 | namespace AntiMattr\Bundle\MongoDBMigrationsBundle\Command; |
||||
13 | |||||
14 | use AntiMattr\MongoDB\Migrations\Tools\Console\Command\GenerateCommand; |
||||
15 | use Symfony\Component\Console\Input\InputInterface; |
||||
16 | use Symfony\Component\Console\Input\InputOption; |
||||
17 | use Symfony\Component\Console\Output\OutputInterface; |
||||
18 | |||||
19 | /** |
||||
20 | * @author Matthew Fitzgerald <[email protected]> |
||||
21 | */ |
||||
22 | class MigrationsGenerateCommand extends GenerateCommand |
||||
23 | { |
||||
24 | protected function configure() |
||||
25 | { |
||||
26 | parent::configure(); |
||||
27 | |||||
28 | $this |
||||
29 | ->setName('mongodb:migrations:generate') |
||||
30 | ->addOption('dm', null, InputOption::VALUE_OPTIONAL, 'The document manager to use for this command.', 'default_document_manager') |
||||
31 | ; |
||||
32 | } |
||||
33 | |||||
34 | public function execute(InputInterface $input, OutputInterface $output) |
||||
35 | { |
||||
36 | CommandHelper::setApplicationDocumentManager($this->getApplication(), $input->getOption('dm')); |
||||
0 ignored issues
–
show
Bug
introduced
by
![]() It seems like
$this->getApplication() can also be of type null ; however, parameter $application of AntiMattr\Bundle\MongoDB...cationDocumentManager() does only seem to accept Symfony\Bundle\FrameworkBundle\Console\Application , 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
![]() |
|||||
37 | |||||
38 | $configuration = $this->getMigrationConfiguration($input, $output); |
||||
39 | CommandHelper::configureMigrations($this->getApplication()->getKernel()->getContainer(), $configuration); |
||||
0 ignored issues
–
show
The method
getKernel() does not exist on Symfony\Component\Console\Application .
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces. This is most likely a typographical error or the method has been renamed. ![]() |
|||||
40 | |||||
41 | parent::execute($input, $output); |
||||
42 | } |
||||
43 | } |
||||
44 |