Skip to content

Commit d04bd11

Browse files
committed
use nowdoc instead of heredoc
1 parent ee4f872 commit d04bd11

File tree

6 files changed

+20
-20
lines changed

6 files changed

+20
-20
lines changed

Command/HelpCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function configure()
4242
new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'),
4343
))
4444
->setDescription('Displays help for a command')
45-
->setHelp(<<<EOF
45+
->setHelp(<<<'EOF'
4646
The <info>%command.name%</info> command displays help for a given command:
4747
4848
<info>php %command.full_name% list</info>

Command/ListCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ protected function configure()
3434
->setName('list')
3535
->setDefinition($this->createDefinition())
3636
->setDescription('Lists commands')
37-
->setHelp(<<<EOF
37+
->setHelp(<<<'EOF'
3838
The <info>%command.name%</info> command lists all commands:
3939
4040
<info>php %command.full_name%</info>

Shell.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function run()
6868
if ($this->processIsolation) {
6969
$finder = new PhpExecutableFinder();
7070
$php = $finder->find();
71-
$this->output->writeln(<<<EOF
71+
$this->output->writeln(<<<'EOF'
7272
<info>Running with process isolation, you should consider this:</info>
7373
* each command is executed as separate process,
7474
* commands don't support interactivity, all params must be passed explicitly,

Tests/Command/ListCommandTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function testExecuteListsCommandsWithRawOption()
3838
$application = new Application();
3939
$commandTester = new CommandTester($command = $application->get('list'));
4040
$commandTester->execute(array('command' => $command->getName(), '--raw' => true));
41-
$output = <<<EOF
41+
$output = <<<'EOF'
4242
help Displays help for a command
4343
list Lists commands
4444

@@ -54,7 +54,7 @@ public function testExecuteListsCommandsWithNamespaceArgument()
5454
$application->add(new \FooCommand());
5555
$commandTester = new CommandTester($command = $application->get('list'));
5656
$commandTester->execute(array('command' => $command->getName(), 'namespace' => 'foo', '--raw' => true));
57-
$output = <<<EOF
57+
$output = <<<'EOF'
5858
foo:bar The foo:bar command
5959

6060
EOF;
@@ -69,7 +69,7 @@ public function testExecuteListsCommandsOrder()
6969
$application->add(new \Foo6Command());
7070
$commandTester = new CommandTester($command = $application->get('list'));
7171
$commandTester->execute(array('command' => $command->getName()), array('decorated' => false));
72-
$output = <<<EOF
72+
$output = <<<'EOF'
7373
Console Tool
7474
7575
Usage:
@@ -101,7 +101,7 @@ public function testExecuteListsCommandsOrderRaw()
101101
$application->add(new \Foo6Command());
102102
$commandTester = new CommandTester($command = $application->get('list'));
103103
$commandTester->execute(array('command' => $command->getName(), '--raw' => true));
104-
$output = <<<EOF
104+
$output = <<<'EOF'
105105
help Displays help for a command
106106
list Lists commands
107107
0foo:bar 0foo:bar command

Tests/Formatter/OutputFormatterTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ public function testContentWithLineBreaks()
220220
\033[32m
221221
some text\033[0m
222222
EOF
223-
, $formatter->format(<<<EOF
223+
, $formatter->format(<<<'EOF'
224224
<info>
225225
some text</info>
226226
EOF
@@ -230,7 +230,7 @@ public function testContentWithLineBreaks()
230230
\033[32msome text
231231
\033[0m
232232
EOF
233-
, $formatter->format(<<<EOF
233+
, $formatter->format(<<<'EOF'
234234
<info>some text
235235
</info>
236236
EOF
@@ -241,7 +241,7 @@ public function testContentWithLineBreaks()
241241
some text
242242
\033[0m
243243
EOF
244-
, $formatter->format(<<<EOF
244+
, $formatter->format(<<<'EOF'
245245
<info>
246246
some text
247247
</info>
@@ -254,7 +254,7 @@ public function testContentWithLineBreaks()
254254
more text
255255
\033[0m
256256
EOF
257-
, $formatter->format(<<<EOF
257+
, $formatter->format(<<<'EOF'
258258
<info>
259259
some text
260260
more text

Tests/Helper/TableHelperTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function testRenderProvider()
9191
array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'),
9292
),
9393
TableHelper::LAYOUT_DEFAULT,
94-
<<<TABLE
94+
<<<'TABLE'
9595
+---------------+--------------------------+------------------+
9696
| ISBN | Title | Author |
9797
+---------------+--------------------------+------------------+
@@ -123,7 +123,7 @@ public function testRenderProvider()
123123
array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'),
124124
),
125125
TableHelper::LAYOUT_DEFAULT,
126-
<<<TABLE
126+
<<<'TABLE'
127127
+---------------+--------------------------+------------------+
128128
| ISBN | Title | |
129129
+---------------+--------------------------+------------------+
@@ -144,7 +144,7 @@ public function testRenderProvider()
144144
array('80-902734-1-6', 'And Then There Were None', 'Agatha Christie'),
145145
),
146146
TableHelper::LAYOUT_DEFAULT,
147-
<<<TABLE
147+
<<<'TABLE'
148148
+---------------+--------------------------+------------------+
149149
| 99921-58-10-7 | Divine Comedy | Dante Alighieri |
150150
| 9971-5-0210-0 | | |
@@ -163,7 +163,7 @@ public function testRenderProvider()
163163
array('960-425-059-0', 'The Lord of the Rings', "J. R. R.\nTolkien"),
164164
),
165165
TableHelper::LAYOUT_DEFAULT,
166-
<<<TABLE
166+
<<<'TABLE'
167167
+---------------+----------------------------+-----------------+
168168
| ISBN | Title | Author |
169169
+---------------+----------------------------+-----------------+
@@ -183,7 +183,7 @@ public function testRenderProvider()
183183
array('ISBN', 'Title'),
184184
array(),
185185
TableHelper::LAYOUT_DEFAULT,
186-
<<<TABLE
186+
<<<'TABLE'
187187
+------+-------+
188188
| ISBN | Title |
189189
+------+-------+
@@ -203,7 +203,7 @@ public function testRenderProvider()
203203
array('9971-5-0210-0', 'A Tale of Two Cities', '<info>Charles Dickens</>'),
204204
),
205205
TableHelper::LAYOUT_DEFAULT,
206-
<<<TABLE
206+
<<<'TABLE'
207207
+---------------+----------------------+-----------------+
208208
| ISBN | Title | Author |
209209
+---------------+----------------------+-----------------+
@@ -220,7 +220,7 @@ public function testRenderProvider()
220220
array('9971-5-0210-0', 'A Tale of Two Cities', 'Charles Dickens'),
221221
),
222222
TableHelper::LAYOUT_DEFAULT,
223-
<<<TABLE
223+
<<<'TABLE'
224224
+----------------------------------+----------------------+-----------------+
225225
| ISBN | Title | Author |
226226
+----------------------------------+----------------------+-----------------+
@@ -247,7 +247,7 @@ public function testRenderMultiByte()
247247
$table->render($output = $this->getOutputStream());
248248

249249
$expected =
250-
<<<TABLE
250+
<<<'TABLE'
251251
+------+
252252
| ■■ |
253253
+------+
@@ -273,7 +273,7 @@ public function testRenderFullWidthCharacters()
273273
$table->render($output = $this->getOutputStream());
274274

275275
$expected =
276-
<<<TABLE
276+
<<<'TABLE'
277277
+------------+
278278
| あいうえお |
279279
+------------+

0 commit comments

Comments
 (0)