-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #376 from doctrine/return-types-optional-commands
declare return types on commands to be future proof
- Loading branch information
Showing
6 changed files
with
15 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,8 @@ | |
use Symfony\Component\DependencyInjection\ContainerInterface; | ||
|
||
/** | ||
* Wrapper to use this command in the symfony console with multiple sessions. | ||
* | ||
* @author Daniel Barsotti <[email protected]> | ||
*/ | ||
class JackrabbitCommand extends BaseJackrabbitCommand implements ContainerAwareInterface | ||
|
@@ -30,17 +32,11 @@ protected function getContainer() | |
return $this->container; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function setContainer(ContainerInterface $container = null) | ||
{ | ||
$this->container = $container; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function configure(): void | ||
{ | ||
parent::configure(); | ||
|
@@ -59,9 +55,6 @@ protected function configure(): void | |
; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output): int | ||
{ | ||
if ($this->getContainer()->hasParameter('doctrine_phpcr.jackrabbit_jar')) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,16 +9,13 @@ | |
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* Integrate command into symfony. | ||
* Wrapper to use this command in the symfony console with multiple sessions. | ||
* | ||
* @author David Buchmann <[email protected]> | ||
*/ | ||
class DocumentConvertTranslationCommand extends BaseDocumentConvertTranslationCommand | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function configure() | ||
protected function configure(): void | ||
{ | ||
parent::configure(); | ||
|
||
|
@@ -34,10 +31,7 @@ protected function configure() | |
); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) | ||
protected function execute(InputInterface $input, OutputInterface $output): int | ||
{ | ||
DoctrineCommandHelper::setApplicationDocumentManager( | ||
$this->getApplication(), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,16 +9,13 @@ | |
use Symfony\Component\Console\Output\OutputInterface; | ||
|
||
/** | ||
* Show information about mapped entities. | ||
* Wrapper to use this command in the symfony console with multiple sessions. | ||
* | ||
* @author Lukas Kahwe Smith <[email protected]> | ||
*/ | ||
class InfoDoctrineCommand extends BaseInfoDoctrineCommand | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function configure() | ||
protected function configure(): void | ||
{ | ||
parent::configure(); | ||
|
||
|
@@ -34,10 +31,7 @@ protected function configure() | |
); | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function execute(InputInterface $input, OutputInterface $output) | ||
protected function execute(InputInterface $input, OutputInterface $output): int | ||
{ | ||
DoctrineCommandHelper::setApplicationDocumentManager( | ||
$this->getApplication(), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters