diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/DependenciesShowFrameworkCommandTest.php b/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/DependenciesShowFrameworkCommandTest.php index 9e73b16468a1b3cec7759ef2ee688f1e27e30336..76db3df10eb0e8c065a4a7406a5469a97660053a 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/DependenciesShowFrameworkCommandTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/DependenciesShowFrameworkCommandTest.php @@ -3,7 +3,7 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Test\Tool\Console\Command; +namespace Magento\Test\Tools\Console\Command; use Magento\Tools\Console\Command\DependenciesShowFrameworkCommand; use Symfony\Component\Console\Tester\CommandTester; @@ -38,7 +38,7 @@ class DependenciesShowFrameworkCommandTest extends \PHPUnit_Framework_TestCase $this->commandTester->execute( ['--directory' => __DIR__ . '/_files/root', '--output' => __DIR__ . '/_files/output/framework.csv'] ); - $this->assertEquals('Report successfully processed.' . PHP_EOL , $this->commandTester->getDisplay()); + $this->assertEquals('Report successfully processed.' . PHP_EOL, $this->commandTester->getDisplay()); $this->assertFileEquals( __DIR__ . '/_files/expected/framework.csv', __DIR__ . '/_files/output/framework.csv' @@ -49,7 +49,7 @@ class DependenciesShowFrameworkCommandTest extends \PHPUnit_Framework_TestCase { $this->commandTester->execute(['--directory' => '/invalid/path']); $this->assertContains( - 'Please, check passed path. Dependencies report generator failed:', + 'Please check the path you provided. Dependencies report generator failed with error:', $this->commandTester->getDisplay() ); } diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/DependenciesShowModulesCircularCommandTest.php b/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/DependenciesShowModulesCircularCommandTest.php index 914faeeaef95f180c3580117ac31c0155a5defac..c47489a361dc77d9420f41d12c67d39fd991f5d6 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/DependenciesShowModulesCircularCommandTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/DependenciesShowModulesCircularCommandTest.php @@ -3,7 +3,7 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Test\Tool\Console\Command; +namespace Magento\Test\Tools\Console\Command; use Magento\Tools\Console\Command\DependenciesShowModulesCircularCommand; use Symfony\Component\Console\Tester\CommandTester; @@ -38,7 +38,7 @@ class DependenciesShowModulesCircularCommandTest extends \PHPUnit_Framework_Test $this->commandTester->execute( ['--directory' => __DIR__ . '/_files/root', '--output' => __DIR__ . '/_files/output/circular.csv'] ); - $this->assertEquals('Report successfully processed.' . PHP_EOL , $this->commandTester->getDisplay()); + $this->assertEquals('Report successfully processed.' . PHP_EOL, $this->commandTester->getDisplay()); $this->assertFileEquals( __DIR__ . '/_files/expected/circular.csv', __DIR__ . '/_files/output/circular.csv' @@ -49,7 +49,7 @@ class DependenciesShowModulesCircularCommandTest extends \PHPUnit_Framework_Test { $this->commandTester->execute(['--directory' => '/invalid/path']); $this->assertContains( - 'Please, check passed path. Dependencies report generator failed:', + 'Please check the path you provided. Dependencies report generator failed with error:', $this->commandTester->getDisplay() ); } diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/DependenciesShowModulesCommandTest.php b/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/DependenciesShowModulesCommandTest.php index 4b9f0fcca27f8a9b1e27db666121087c81cd94df..348d82f098a27cf1191e6243868e6cb180826024 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/DependenciesShowModulesCommandTest.php +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/DependenciesShowModulesCommandTest.php @@ -3,7 +3,7 @@ * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ -namespace Magento\Test\Tool\Console\Command; +namespace Magento\Test\Tools\Console\Command; use Magento\Tools\Console\Command\DependenciesShowModulesCommand; use Symfony\Component\Console\Tester\CommandTester; @@ -38,7 +38,7 @@ class DependenciesShowModulesCommandTest extends \PHPUnit_Framework_TestCase $this->commandTester->execute( ['--directory' => __DIR__ . '/_files/root', '--output' => __DIR__ . '/_files/output/modules.csv'] ); - $this->assertEquals('Report successfully processed.' . PHP_EOL , $this->commandTester->getDisplay()); + $this->assertEquals('Report successfully processed.' . PHP_EOL, $this->commandTester->getDisplay()); $this->assertFileEquals( __DIR__ . '/_files/expected/modules.csv', __DIR__ . '/_files/output/modules.csv' @@ -49,7 +49,7 @@ class DependenciesShowModulesCommandTest extends \PHPUnit_Framework_TestCase { $this->commandTester->execute(['--directory' => '/invalid/path']); $this->assertContains( - 'Please, check passed path. Dependencies report generator failed:', + 'Please check the path you provided. Dependencies report generator failed with error:', $this->commandTester->getDisplay() ); } diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/_files/root/app/code/Magento/A/Model/Foo.php b/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/_files/root/app/code/Magento/A/Model/Foo.php index 6300096a6eb800a3141ec73bd69459492e70e65c..25f20265a9c354c87ea0cea4f8c1ed3c9a7b5028 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/_files/root/app/code/Magento/A/Model/Foo.php +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/_files/root/app/code/Magento/A/Model/Foo.php @@ -7,6 +7,9 @@ namespace Magento\A\Model; class Foo { + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function foo() { $frameworkDependencies = new \Magento\Framework\A(); diff --git a/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/_files/root/app/code/Magento/B/Model/Foo.php b/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/_files/root/app/code/Magento/B/Model/Foo.php index 5868020636af71986b6850b5b4fe6f6bb0cca56d..843ade228dd5315f44e164e363ebfee0bf10deab 100644 --- a/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/_files/root/app/code/Magento/B/Model/Foo.php +++ b/dev/tests/integration/testsuite/Magento/Test/Tools/Console/Command/_files/root/app/code/Magento/B/Model/Foo.php @@ -7,6 +7,9 @@ namespace Magento\B\Model; class Foo { + /** + * @SuppressWarnings(PHPMD.UnusedLocalVariable) + */ public function foo() { $frameworkDependencies = new \Magento\Framework\B(); diff --git a/dev/tools/Magento/Tools/Console/Command/AbstractDependenciesCommand.php b/dev/tools/Magento/Tools/Console/Command/AbstractDependenciesCommand.php index 51649929b7a433a14f842942c22e135c90e4d0fd..19c94e8dfe193b2670ef93722a1f8856720a2902 100644 --- a/dev/tools/Magento/Tools/Console/Command/AbstractDependenciesCommand.php +++ b/dev/tools/Magento/Tools/Console/Command/AbstractDependenciesCommand.php @@ -40,8 +40,8 @@ abstract class AbstractDependenciesCommand extends Command self::INPUT_KEY_OUTPUT, 'o', InputOption::VALUE_REQUIRED, - 'Path to report file', - $this->getDefaultOutputPath() + 'Report filename', + $this->getDefaultOutputFilename() ) ] ); @@ -57,11 +57,11 @@ abstract class AbstractDependenciesCommand extends Command abstract protected function buildReport($outputPath); /** - * Get path to the default output report file + * Get the default output report filename * * @return string */ - abstract protected function getDefaultOutputPath(); + abstract protected function getDefaultOutputFilename(); /** * {@inheritdoc} @@ -74,7 +74,7 @@ abstract class AbstractDependenciesCommand extends Command $output->writeln('<info>Report successfully processed.</info>'); } catch (\Exception $e) { $output->writeln( - '<error>Please, check passed path. Dependencies report generator failed: ' . + '<error>Please check the path you provided. Dependencies report generator failed with error: ' . $e->getMessage() . '</error>' ); } diff --git a/dev/tools/Magento/Tools/Console/Command/DependenciesShowFrameworkCommand.php b/dev/tools/Magento/Tools/Console/Command/DependenciesShowFrameworkCommand.php index 87306ba0f9970b2ee86f524a5b50733bfd28c588..03499b681ba40d9df238823b7e141f3f877b5921 100644 --- a/dev/tools/Magento/Tools/Console/Command/DependenciesShowFrameworkCommand.php +++ b/dev/tools/Magento/Tools/Console/Command/DependenciesShowFrameworkCommand.php @@ -24,11 +24,11 @@ class DependenciesShowFrameworkCommand extends AbstractDependenciesCommand } /** - * Return default output file for framework dependencies report + * Return default output filename for framework dependencies report * * @return string */ - protected function getDefaultOutputPath() + protected function getDefaultOutputFilename() { return 'framework-dependencies.csv'; } diff --git a/dev/tools/Magento/Tools/Console/Command/DependenciesShowModulesCircularCommand.php b/dev/tools/Magento/Tools/Console/Command/DependenciesShowModulesCircularCommand.php index 11916895c0ec94085bd5284baff40df9bd97adf7..96a4dfeb25fe84815dfcd80f76044ee1c4843bd0 100644 --- a/dev/tools/Magento/Tools/Console/Command/DependenciesShowModulesCircularCommand.php +++ b/dev/tools/Magento/Tools/Console/Command/DependenciesShowModulesCircularCommand.php @@ -24,11 +24,11 @@ class DependenciesShowModulesCircularCommand extends AbstractDependenciesCommand } /** - * Return default output file for modules circular dependencies report + * Return default output filename for modules circular dependencies report * * @return string */ - protected function getDefaultOutputPath() + protected function getDefaultOutputFilename() { return 'modules-circular-dependencies.csv'; } diff --git a/dev/tools/Magento/Tools/Console/Command/DependenciesShowModulesCommand.php b/dev/tools/Magento/Tools/Console/Command/DependenciesShowModulesCommand.php index 31aacdb259f45f695c3714f30efbfcf68b1ee21f..1c7ced7c37c959029df6bc1091ff20c4636bd0ff 100644 --- a/dev/tools/Magento/Tools/Console/Command/DependenciesShowModulesCommand.php +++ b/dev/tools/Magento/Tools/Console/Command/DependenciesShowModulesCommand.php @@ -24,11 +24,11 @@ class DependenciesShowModulesCommand extends AbstractDependenciesCommand } /** - * Return default output file for modules dependencies report + * Return default output filename for modules dependencies report * * @return string */ - protected function getDefaultOutputPath() + protected function getDefaultOutputFilename() { return 'modules-dependencies.csv'; }