Skip to content

Commit 3458674

Browse files
author
Adrien Schaegis
committed
[UPDATE] Add return statements of parent class
1 parent c0a2f5d commit 3458674

7 files changed

+25
-18
lines changed

Command/MigrationsDiffDoctrineCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Doctrine\Bundle\DoctrineBundle\Command\Proxy\DoctrineCommandHelper;
1818
use Doctrine\DBAL\Migrations\Tools\Console\Command\DiffCommand;
1919
use Doctrine\DBAL\Sharding\PoolingShardConnection;
20+
use LogicException;
2021
use Symfony\Component\Console\Input\InputInterface;
2122
use Symfony\Component\Console\Input\InputOption;
2223
use Symfony\Component\Console\Output\OutputInterface;
@@ -48,7 +49,7 @@ public function execute(InputInterface $input, OutputInterface $output)
4849
if ($input->getOption('shard')) {
4950
$connection = $this->getApplication()->getHelperSet()->get('db')->getConnection();
5051
if (!$connection instanceof PoolingShardConnection) {
51-
throw new \LogicException(sprintf("Connection of EntityManager '%s' must implements shards configuration.", $input->getOption('em')));
52+
throw new LogicException(sprintf("Connection of EntityManager '%s' must implements shards configuration.", $input->getOption('em')));
5253
}
5354

5455
$connection->connect($input->getOption('shard'));
@@ -57,6 +58,6 @@ public function execute(InputInterface $input, OutputInterface $output)
5758
$configuration = $this->getMigrationConfiguration($input, $output);
5859
DoctrineCommand::configureMigrations($this->getApplication()->getKernel()->getContainer(), $configuration);
5960

60-
parent::execute($input, $output);
61+
return parent::execute($input, $output);
6162
}
6263
}

Command/MigrationsExecuteDoctrineCommand.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
namespace Doctrine\Bundle\MigrationsBundle\Command;
1616

17+
use InvalidArgumentException;
1718
use Symfony\Component\Console\Input\InputInterface;
1819
use Symfony\Component\Console\Output\OutputInterface;
1920
use Symfony\Component\Console\Input\InputOption;
@@ -43,14 +44,14 @@ public function execute(InputInterface $input, OutputInterface $output)
4344
{
4445
// EM and DB options cannot be set at same time
4546
if (null !== $input->getOption('em') && null !== $input->getOption('db')) {
46-
throw new \InvalidArgumentException('Cannot set both "em" and "db" for command execution.');
47+
throw new InvalidArgumentException('Cannot set both "em" and "db" for command execution.');
4748
}
4849

4950
Helper\DoctrineCommandHelper::setApplicationHelper($this->getApplication(), $input);
5051

5152
$configuration = $this->getMigrationConfiguration($input, $output);
5253
DoctrineCommand::configureMigrations($this->getApplication()->getKernel()->getContainer(), $configuration);
53-
54-
parent::execute($input, $output);
54+
55+
return parent::execute($input, $output);
5556
}
5657
}

Command/MigrationsGenerateDoctrineCommand.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
namespace Doctrine\Bundle\MigrationsBundle\Command;
1616

17+
use InvalidArgumentException;
1718
use Symfony\Component\Console\Input\InputInterface;
1819
use Symfony\Component\Console\Output\OutputInterface;
1920
use Symfony\Component\Console\Input\InputOption;
@@ -43,14 +44,14 @@ public function execute(InputInterface $input, OutputInterface $output)
4344
{
4445
// EM and DB options cannot be set at same time
4546
if (null !== $input->getOption('em') && null !== $input->getOption('db')) {
46-
throw new \InvalidArgumentException('Cannot set both "em" and "db" for command execution.');
47+
throw new InvalidArgumentException('Cannot set both "em" and "db" for command execution.');
4748
}
4849

4950
Helper\DoctrineCommandHelper::setApplicationHelper($this->getApplication(), $input);
5051

5152
$configuration = $this->getMigrationConfiguration($input, $output);
5253
DoctrineCommand::configureMigrations($this->getApplication()->getKernel()->getContainer(), $configuration);
53-
54-
parent::execute($input, $output);
54+
55+
return parent::execute($input, $output);
5556
}
5657
}

Command/MigrationsLatestDoctrineCommand.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
namespace Doctrine\Bundle\MigrationsBundle\Command;
1616

17+
use InvalidArgumentException;
1718
use Symfony\Component\Console\Input\InputInterface;
1819
use Symfony\Component\Console\Output\OutputInterface;
1920
use Symfony\Component\Console\Input\InputOption;
@@ -43,14 +44,14 @@ public function execute(InputInterface $input, OutputInterface $output)
4344
{
4445
// EM and DB options cannot be set at same time
4546
if (null !== $input->getOption('em') && null !== $input->getOption('db')) {
46-
throw new \InvalidArgumentException('Cannot set both "em" and "db" for command execution.');
47+
throw new InvalidArgumentException('Cannot set both "em" and "db" for command execution.');
4748
}
4849

4950
Helper\DoctrineCommandHelper::setApplicationHelper($this->getApplication(), $input);
5051

5152
$configuration = $this->getMigrationConfiguration($input, $output);
5253
DoctrineCommand::configureMigrations($this->getApplication()->getKernel()->getContainer(), $configuration);
53-
54-
parent::execute($input, $output);
54+
55+
return parent::execute($input, $output);
5556
}
5657
}

Command/MigrationsMigrateDoctrineCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
namespace Doctrine\Bundle\MigrationsBundle\Command;
1616

17+
use InvalidArgumentException;
1718
use Symfony\Component\Console\Input\InputInterface;
1819
use Symfony\Component\Console\Output\OutputInterface;
1920
use Symfony\Component\Console\Input\InputOption;
@@ -43,14 +44,14 @@ public function execute(InputInterface $input, OutputInterface $output)
4344
{
4445
// EM and DB options cannot be set at same time
4546
if (null !== $input->getOption('em') && null !== $input->getOption('db')) {
46-
throw new \InvalidArgumentException('Cannot set both "em" and "db" for command execution.');
47+
throw new InvalidArgumentException('Cannot set both "em" and "db" for command execution.');
4748
}
4849

4950
Helper\DoctrineCommandHelper::setApplicationHelper($this->getApplication(), $input);
5051

5152
$configuration = $this->getMigrationConfiguration($input, $output);
5253
DoctrineCommand::configureMigrations($this->getApplication()->getKernel()->getContainer(), $configuration);
5354

54-
parent::execute($input, $output);
55+
return parent::execute($input, $output);
5556
}
5657
}

Command/MigrationsStatusDoctrineCommand.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
namespace Doctrine\Bundle\MigrationsBundle\Command;
1616

17+
use InvalidArgumentException;
1718
use Symfony\Component\Console\Input\InputInterface;
1819
use Symfony\Component\Console\Output\OutputInterface;
1920
use Symfony\Component\Console\Input\InputOption;
@@ -43,14 +44,14 @@ public function execute(InputInterface $input, OutputInterface $output)
4344
{
4445
// EM and DB options cannot be set at same time
4546
if (null !== $input->getOption('em') && null !== $input->getOption('db')) {
46-
throw new \InvalidArgumentException('Cannot set both "em" and "db" for command execution.');
47+
throw new InvalidArgumentException('Cannot set both "em" and "db" for command execution.');
4748
}
4849

4950
Helper\DoctrineCommandHelper::setApplicationHelper($this->getApplication(), $input);
5051

5152
$configuration = $this->getMigrationConfiguration($input, $output);
5253
DoctrineCommand::configureMigrations($this->getApplication()->getKernel()->getContainer(), $configuration);
53-
54-
parent::execute($input, $output);
54+
55+
return parent::execute($input, $output);
5556
}
5657
}

Command/MigrationsVersionDoctrineCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
namespace Doctrine\Bundle\MigrationsBundle\Command;
1616

17+
use InvalidArgumentException;
1718
use Symfony\Component\Console\Input\InputInterface;
1819
use Symfony\Component\Console\Output\OutputInterface;
1920
use Symfony\Component\Console\Input\InputOption;
@@ -43,14 +44,14 @@ public function execute(InputInterface $input, OutputInterface $output)
4344
{
4445
// EM and DB options cannot be set at same time
4546
if (null !== $input->getOption('em') && null !== $input->getOption('db')) {
46-
throw new \InvalidArgumentException('Cannot set both "em" and "db" for command execution.');
47+
throw new InvalidArgumentException('Cannot set both "em" and "db" for command execution.');
4748
}
4849

4950
Helper\DoctrineCommandHelper::setApplicationHelper($this->getApplication(), $input);
5051

5152
$configuration = $this->getMigrationConfiguration($input, $output);
5253
DoctrineCommand::configureMigrations($this->getApplication()->getKernel()->getContainer(), $configuration);
5354

54-
parent::execute($input, $output);
55+
return parent::execute($input, $output);
5556
}
5657
}

0 commit comments

Comments
 (0)