From d04bd11bb228ae38425c2cc87476a11300c340f0 Mon Sep 17 00:00:00 2001 From: Gregor Harlan Date: Mon, 21 Dec 2015 12:01:57 +0100 Subject: [PATCH] use nowdoc instead of heredoc --- Command/HelpCommand.php | 2 +- Command/ListCommand.php | 2 +- Shell.php | 2 +- Tests/Command/ListCommandTest.php | 8 ++++---- Tests/Formatter/OutputFormatterTest.php | 8 ++++---- Tests/Helper/TableHelperTest.php | 18 +++++++++--------- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Command/HelpCommand.php b/Command/HelpCommand.php index d4b9dea63..0937f3704 100644 --- a/Command/HelpCommand.php +++ b/Command/HelpCommand.php @@ -42,7 +42,7 @@ protected function configure() new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'), )) ->setDescription('Displays help for a command') - ->setHelp(<<setHelp(<<<'EOF' The %command.name% command displays help for a given command: php %command.full_name% list diff --git a/Command/ListCommand.php b/Command/ListCommand.php index f3d7438d0..6bd3026ef 100644 --- a/Command/ListCommand.php +++ b/Command/ListCommand.php @@ -34,7 +34,7 @@ protected function configure() ->setName('list') ->setDefinition($this->createDefinition()) ->setDescription('Lists commands') - ->setHelp(<<setHelp(<<<'EOF' The %command.name% command lists all commands: php %command.full_name% diff --git a/Shell.php b/Shell.php index d0bcb7ee8..f95b9a07a 100644 --- a/Shell.php +++ b/Shell.php @@ -68,7 +68,7 @@ public function run() if ($this->processIsolation) { $finder = new PhpExecutableFinder(); $php = $finder->find(); - $this->output->writeln(<<output->writeln(<<<'EOF' Running with process isolation, you should consider this: * each command is executed as separate process, * commands don't support interactivity, all params must be passed explicitly, diff --git a/Tests/Command/ListCommandTest.php b/Tests/Command/ListCommandTest.php index d5b5bfbdb..c29ec6b87 100644 --- a/Tests/Command/ListCommandTest.php +++ b/Tests/Command/ListCommandTest.php @@ -38,7 +38,7 @@ public function testExecuteListsCommandsWithRawOption() $application = new Application(); $commandTester = new CommandTester($command = $application->get('list')); $commandTester->execute(array('command' => $command->getName(), '--raw' => true)); - $output = <<add(new \FooCommand()); $commandTester = new CommandTester($command = $application->get('list')); $commandTester->execute(array('command' => $command->getName(), 'namespace' => 'foo', '--raw' => true)); - $output = <<add(new \Foo6Command()); $commandTester = new CommandTester($command = $application->get('list')); $commandTester->execute(array('command' => $command->getName()), array('decorated' => false)); - $output = <<add(new \Foo6Command()); $commandTester = new CommandTester($command = $application->get('list')); $commandTester->execute(array('command' => $command->getName(), '--raw' => true)); - $output = <<format(<<format(<<<'EOF' some text EOF @@ -230,7 +230,7 @@ public function testContentWithLineBreaks() \033[32msome text \033[0m EOF - , $formatter->format(<<format(<<<'EOF' some text EOF @@ -241,7 +241,7 @@ public function testContentWithLineBreaks() some text \033[0m EOF - , $formatter->format(<<format(<<<'EOF' some text @@ -254,7 +254,7 @@ public function testContentWithLineBreaks() more text \033[0m EOF - , $formatter->format(<<format(<<<'EOF' some text more text diff --git a/Tests/Helper/TableHelperTest.php b/Tests/Helper/TableHelperTest.php index d862929a0..c39f04464 100644 --- a/Tests/Helper/TableHelperTest.php +++ b/Tests/Helper/TableHelperTest.php @@ -91,7 +91,7 @@ public function testRenderProvider() array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'), ), TableHelper::LAYOUT_DEFAULT, -<<Charles Dickens'), ), TableHelper::LAYOUT_DEFAULT, -<<
render($output = $this->getOutputStream()); $expected = -<<
render($output = $this->getOutputStream()); $expected = - <<