Skip to content

Commit

Permalink
use nowdoc instead of heredoc
Browse files Browse the repository at this point in the history
  • Loading branch information
gharlan committed Dec 21, 2015
1 parent ee4f872 commit d04bd11
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Command/HelpCommand.php
Expand Up @@ -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(<<<EOF
->setHelp(<<<'EOF'
The <info>%command.name%</info> command displays help for a given command:
<info>php %command.full_name% list</info>
Expand Down
2 changes: 1 addition & 1 deletion Command/ListCommand.php
Expand Up @@ -34,7 +34,7 @@ protected function configure()
->setName('list')
->setDefinition($this->createDefinition())
->setDescription('Lists commands')
->setHelp(<<<EOF
->setHelp(<<<'EOF'
The <info>%command.name%</info> command lists all commands:
<info>php %command.full_name%</info>
Expand Down
2 changes: 1 addition & 1 deletion Shell.php
Expand Up @@ -68,7 +68,7 @@ public function run()
if ($this->processIsolation) {
$finder = new PhpExecutableFinder();
$php = $finder->find();
$this->output->writeln(<<<EOF
$this->output->writeln(<<<'EOF'
<info>Running with process isolation, you should consider this:</info>
* each command is executed as separate process,
* commands don't support interactivity, all params must be passed explicitly,
Expand Down
8 changes: 4 additions & 4 deletions Tests/Command/ListCommandTest.php
Expand Up @@ -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 = <<<EOF
$output = <<<'EOF'
help Displays help for a command
list Lists commands
Expand All @@ -54,7 +54,7 @@ public function testExecuteListsCommandsWithNamespaceArgument()
$application->add(new \FooCommand());
$commandTester = new CommandTester($command = $application->get('list'));
$commandTester->execute(array('command' => $command->getName(), 'namespace' => 'foo', '--raw' => true));
$output = <<<EOF
$output = <<<'EOF'
foo:bar The foo:bar command
EOF;
Expand All @@ -69,7 +69,7 @@ public function testExecuteListsCommandsOrder()
$application->add(new \Foo6Command());
$commandTester = new CommandTester($command = $application->get('list'));
$commandTester->execute(array('command' => $command->getName()), array('decorated' => false));
$output = <<<EOF
$output = <<<'EOF'
Console Tool
Usage:
Expand Down Expand Up @@ -101,7 +101,7 @@ public function testExecuteListsCommandsOrderRaw()
$application->add(new \Foo6Command());
$commandTester = new CommandTester($command = $application->get('list'));
$commandTester->execute(array('command' => $command->getName(), '--raw' => true));
$output = <<<EOF
$output = <<<'EOF'
help Displays help for a command
list Lists commands
0foo:bar 0foo:bar command
Expand Down
8 changes: 4 additions & 4 deletions Tests/Formatter/OutputFormatterTest.php
Expand Up @@ -220,7 +220,7 @@ public function testContentWithLineBreaks()
\033[32m
some text\033[0m
EOF
, $formatter->format(<<<EOF
, $formatter->format(<<<'EOF'
<info>
some text</info>
EOF
Expand All @@ -230,7 +230,7 @@ public function testContentWithLineBreaks()
\033[32msome text
\033[0m
EOF
, $formatter->format(<<<EOF
, $formatter->format(<<<'EOF'
<info>some text
</info>
EOF
Expand All @@ -241,7 +241,7 @@ public function testContentWithLineBreaks()
some text
\033[0m
EOF
, $formatter->format(<<<EOF
, $formatter->format(<<<'EOF'
<info>
some text
</info>
Expand All @@ -254,7 +254,7 @@ public function testContentWithLineBreaks()
more text
\033[0m
EOF
, $formatter->format(<<<EOF
, $formatter->format(<<<'EOF'
<info>
some text
more text
Expand Down
18 changes: 9 additions & 9 deletions Tests/Helper/TableHelperTest.php
Expand Up @@ -91,7 +91,7 @@ public function testRenderProvider()
array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'),
),
TableHelper::LAYOUT_DEFAULT,
<<<TABLE
<<<'TABLE'
+---------------+--------------------------+------------------+
| ISBN | Title | Author |
+---------------+--------------------------+------------------+
Expand Down Expand Up @@ -123,7 +123,7 @@ public function testRenderProvider()
array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'),
),
TableHelper::LAYOUT_DEFAULT,
<<<TABLE
<<<'TABLE'
+---------------+--------------------------+------------------+
| ISBN | Title | |
+---------------+--------------------------+------------------+
Expand All @@ -144,7 +144,7 @@ public function testRenderProvider()
array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'),
),
TableHelper::LAYOUT_DEFAULT,
<<<TABLE
<<<'TABLE'
+---------------+--------------------------+------------------+
| 99921-58-10-7 | Divine Comedy | Dante Alighieri |
| 9971-5-0210-0 | | |
Expand All @@ -163,7 +163,7 @@ public function testRenderProvider()
array('960-425-059-0', 'The Lord of the Rings', "J. R. R.\nTolkien"),
),
TableHelper::LAYOUT_DEFAULT,
<<<TABLE
<<<'TABLE'
+---------------+----------------------------+-----------------+
| ISBN | Title | Author |
+---------------+----------------------------+-----------------+
Expand All @@ -183,7 +183,7 @@ public function testRenderProvider()
array('ISBN', 'Title'),
array(),
TableHelper::LAYOUT_DEFAULT,
<<<TABLE
<<<'TABLE'
+------+-------+
| ISBN | Title |
+------+-------+
Expand All @@ -203,7 +203,7 @@ public function testRenderProvider()
array('9971-5-0210-0', 'A Tale of Two Cities', '<info>Charles Dickens</>'),
),
TableHelper::LAYOUT_DEFAULT,
<<<TABLE
<<<'TABLE'
+---------------+----------------------+-----------------+
| ISBN | Title | Author |
+---------------+----------------------+-----------------+
Expand All @@ -220,7 +220,7 @@ public function testRenderProvider()
array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'),
),
TableHelper::LAYOUT_DEFAULT,
<<<TABLE
<<<'TABLE'
+----------------------------------+----------------------+-----------------+
| ISBN | Title | Author |
+----------------------------------+----------------------+-----------------+
Expand All @@ -247,7 +247,7 @@ public function testRenderMultiByte()
$table->render($output = $this->getOutputStream());

$expected =
<<<TABLE
<<<'TABLE'
+------+
| ■■ |
+------+
Expand All @@ -273,7 +273,7 @@ public function testRenderFullWidthCharacters()
$table->render($output = $this->getOutputStream());

$expected =
<<<TABLE
<<<'TABLE'
+------------+
| あいうえお |
+------------+
Expand Down

0 comments on commit d04bd11

Please sign in to comment.