diff --git a/composer/bin/test-reporter b/composer/bin/test-reporter index 3a1e766..71e55e8 100755 --- a/composer/bin/test-reporter +++ b/composer/bin/test-reporter @@ -28,7 +28,5 @@ if (!defined('PHP_TEST_REPORTER_COMPOSER_INSTALL')) { ); } -$rootDir = realpath(dirname(PHP_TEST_REPORTER_COMPOSER_INSTALL) . '/..'); - -$app = new Application($rootDir, 'Code Climate PHP Test Reporter', Version::VERSION); +$app = new Application('Code Climate PHP Test Reporter', Version::VERSION); $app->run(); diff --git a/src/Application.php b/src/Application.php index ccdc800..5ce0e60 100644 --- a/src/Application.php +++ b/src/Application.php @@ -11,26 +11,6 @@ */ class Application extends BaseApplication { - /** - * Path to project root directory. - * @var string - */ - private $rootDir; - - /** - * Constructor. - * - * @param string $rootDir Path to project root directory. - * @param string $name The name of the application - * @param string $version The version of the application - */ - public function __construct($rootDir, $name = 'UNKNOWN', $version = 'UNKNOWN') - { - $this->rootDir = $rootDir; - - parent::__construct($name, $version); - } - // internal method /** @@ -63,7 +43,6 @@ protected function getDefaultCommands() protected function createTestReporterCommand() { $command = new TestReporterCommand(); - $command->setRootDir($this->rootDir); return $command; } diff --git a/src/ConsoleCommands/TestReporterCommand.php b/src/ConsoleCommands/TestReporterCommand.php index 0db923a..53719d4 100644 --- a/src/ConsoleCommands/TestReporterCommand.php +++ b/src/ConsoleCommands/TestReporterCommand.php @@ -14,12 +14,6 @@ */ class TestReporterCommand extends Command { - /** - * Path to project root directory. - * @var string - */ - protected $rootDir; - /** * {@inheritdoc} * @see \Symfony\Component\Console\Command\Command::configure() @@ -79,18 +73,4 @@ protected function execute(InputInterface $input, OutputInterface $output) return $ret; } - - // accessor - - /** - * Set root directory. - * - * @param string $rootDir Path to project root directory. - * - * @return void - */ - public function setRootDir($rootDir) - { - $this->rootDir = $rootDir; - } }