Skip to content

Commit 64b3972

Browse files
committed
cs and test fix
1 parent 27d13fa commit 64b3972

File tree

7 files changed

+15
-30
lines changed

7 files changed

+15
-30
lines changed

Command/DeleteObsoleteCommand.php

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Translation\Bundle\Command;
1313

14-
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
1514
use Symfony\Component\Console\Command\Command;
1615
use Symfony\Component\Console\Helper\ProgressBar;
1716
use Symfony\Component\Console\Input\InputArgument;
@@ -54,11 +53,10 @@ class DeleteObsoleteCommand extends Command
5453
private $catalogueFetcher;
5554

5655
/**
57-
*
58-
* @param StorageManager $storageManager
56+
* @param StorageManager $storageManager
5957
* @param ConfigurationManager $configurationManager
60-
* @param CatalogueManager $catalogueManager
61-
* @param CatalogueFetcher $catalogueFetcher
58+
* @param CatalogueManager $catalogueManager
59+
* @param CatalogueFetcher $catalogueFetcher
6260
*/
6361
public function __construct(
6462
StorageManager $storageManager,
@@ -73,7 +71,6 @@ public function __construct(
7371
parent::__construct();
7472
}
7573

76-
7774
protected function configure()
7875
{
7976
$this

Command/DownloadCommand.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Translation\Bundle\Command;
1313

14-
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
1514
use Symfony\Component\Console\Command\Command;
1615
use Symfony\Component\Console\Input\InputArgument;
1716
use Symfony\Component\Console\Input\InputOption;
@@ -21,7 +20,6 @@
2120
use Translation\Bundle\Service\CacheClearer;
2221
use Translation\Bundle\Service\ConfigurationManager;
2322
use Translation\Bundle\Service\StorageManager;
24-
use Translation\Bundle\Service\StorageService;
2523
use Translation\Bundle\Model\Configuration;
2624

2725
/**
@@ -49,10 +47,9 @@ class DownloadCommand extends Command
4947
private $cacheCleaner;
5048

5149
/**
52-
*
53-
* @param StorageManager $storageManager
50+
* @param StorageManager $storageManager
5451
* @param ConfigurationManager $configurationManager
55-
* @param CacheClearer $cacheCleaner
52+
* @param CacheClearer $cacheCleaner
5653
*/
5754
public function __construct(
5855
StorageManager $storageManager,
@@ -65,7 +62,6 @@ public function __construct(
6562
parent::__construct();
6663
}
6764

68-
6965
protected function configure()
7066
{
7167
$this

Command/ExtractCommand.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Translation\Bundle\Command;
1313

14-
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
1514
use Symfony\Component\Console\Command\Command;
1615
use Symfony\Component\Console\Input\InputArgument;
1716
use Symfony\Component\Console\Input\InputInterface;
@@ -62,11 +61,10 @@ class ExtractCommand extends Command
6261
private $configurationManager;
6362

6463
/**
65-
*
66-
* @param CatalogueFetcher $catalogueFetcher
67-
* @param CatalogueWriter $catalogueWriter
68-
* @param CatalogueCounter $catalogueCounter
69-
* @param Importer $importer
64+
* @param CatalogueFetcher $catalogueFetcher
65+
* @param CatalogueWriter $catalogueWriter
66+
* @param CatalogueCounter $catalogueCounter
67+
* @param Importer $importer
7068
* @param ConfigurationManager $configurationManager
7169
*/
7270
public function __construct(
@@ -85,7 +83,6 @@ public function __construct(
8583
parent::__construct();
8684
}
8785

88-
8986
protected function configure()
9087
{
9188
$this
@@ -99,7 +96,6 @@ protected function configure()
9996

10097
protected function execute(InputInterface $input, OutputInterface $output)
10198
{
102-
10399
$config = $this->configurationManager->getConfiguration($input->getArgument('configuration'));
104100

105101
$locales = [];

Command/StatusCommand.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Translation\Bundle\Command;
1313

14-
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
1514
use Symfony\Component\Console\Command\Command;
1615
use Symfony\Component\Console\Input\InputArgument;
1716
use Symfony\Component\Console\Input\InputInterface;
@@ -47,10 +46,9 @@ class StatusCommand extends Command
4746
private $catalogueFetcher;
4847

4948
/**
50-
*
51-
* @param CatalogueCounter $catalogueCounter
49+
* @param CatalogueCounter $catalogueCounter
5250
* @param ConfigurationManager $configurationManager
53-
* @param CatalogueFetcher $catalogueFetcher
51+
* @param CatalogueFetcher $catalogueFetcher
5452
*/
5553
public function __construct(
5654
CatalogueCounter $catalogueCounter,
@@ -64,7 +62,6 @@ public function __construct(
6462
parent::__construct();
6563
}
6664

67-
6865
protected function configure()
6966
{
7067
$this

Command/SyncCommand.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,11 @@
1111

1212
namespace Translation\Bundle\Command;
1313

14-
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
1514
use Symfony\Component\Console\Command\Command;
1615
use Symfony\Component\Console\Input\InputArgument;
1716
use Symfony\Component\Console\Input\InputInterface;
1817
use Symfony\Component\Console\Output\OutputInterface;
1918
use Translation\Bundle\Service\StorageManager;
20-
use Translation\Bundle\Service\StorageService;
2119

2220
/**
2321
* @author Tobias Nyholm <tobias.nyholm@gmail.com>
@@ -32,7 +30,6 @@ class SyncCommand extends Command
3230
private $storageManager;
3331

3432
/**
35-
*
3633
* @param StorageManager $storageManager
3734
*/
3835
public function __construct(StorageManager $storageManager)

Tests/Functional/Command/ExtractCommandTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ public function testExecute()
6767
$this->bootKernel();
6868
$application = new Application($this->kernel);
6969

70-
$application->add(new ExtractCommand());
70+
$container = $this->getContainer();
71+
$application->add($container->get('php_translator.console.extract'));
7172

7273
$command = $application->find('translation:extract');
7374
$commandTester = new CommandTester($command);

Tests/Functional/Command/StatusCommandTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ public function testExecute()
2929
$this->bootKernel();
3030
$application = new Application($this->kernel);
3131

32-
$application->add(new StatusCommand());
32+
$container = $this->getContainer();
33+
$application->add($container->get('php_translator.console.status'));
3334

3435
$command = $application->find('translation:status');
3536
$commandTester = new CommandTester($command);

0 commit comments

Comments
 (0)