Skip to content

Commit 29db411

Browse files
minor #61373 chore: PHP CS Fixer - heredoc indentation as of PHP 7.3 (keradus)
This PR was merged into the 7.4 branch. Discussion ---------- chore: PHP CS Fixer - heredoc indentation as of PHP 7.3 | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Issues | Fix CS <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> | License | MIT inspired by symfony/symfony@06e22b0#r2265021821 [Possible since PHP 7.3](https://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc) with love by [PHP Coding Standards Fixer](https://cs.symfony.com/) Commits ------- 4a25a6a5785 chore: heredoc indentation as of PHP 7.3
2 parents 997dabc + 7d30cbb commit 29db411

11 files changed

+210
-210
lines changed

Command/DebugCommand.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -60,25 +60,25 @@ protected function configure(): void
6060
new InputOption('format', null, InputOption::VALUE_REQUIRED, \sprintf('The output format ("%s")', implode('", "', $this->getAvailableFormatOptions())), 'txt'),
6161
])
6262
->setHelp(<<<'EOF'
63-
The <info>%command.name%</info> command outputs a list of twig functions,
64-
filters, globals and tests.
63+
The <info>%command.name%</info> command outputs a list of twig functions,
64+
filters, globals and tests.
6565
66-
<info>php %command.full_name%</info>
66+
<info>php %command.full_name%</info>
6767
68-
The command lists all functions, filters, etc.
68+
The command lists all functions, filters, etc.
6969
70-
<info>php %command.full_name% @Twig/Exception/error.html.twig</info>
70+
<info>php %command.full_name% @Twig/Exception/error.html.twig</info>
7171
72-
The command lists all paths that match the given template name.
72+
The command lists all paths that match the given template name.
7373
74-
<info>php %command.full_name% --filter=date</info>
74+
<info>php %command.full_name% --filter=date</info>
7575
76-
The command lists everything that contains the word date.
76+
The command lists everything that contains the word date.
7777
78-
<info>php %command.full_name% --format=json</info>
78+
<info>php %command.full_name% --format=json</info>
7979
80-
The command lists everything in a machine readable json format.
81-
EOF
80+
The command lists everything in a machine readable json format.
81+
EOF
8282
)
8383
;
8484
}

Command/LintCommand.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,25 +57,25 @@ protected function configure(): void
5757
->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN')
5858
->addOption('excludes', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Excluded directories', [])
5959
->setHelp(<<<'EOF'
60-
The <info>%command.name%</info> command lints a template and outputs to STDOUT
61-
the first encountered syntax error.
60+
The <info>%command.name%</info> command lints a template and outputs to STDOUT
61+
the first encountered syntax error.
6262
63-
You can validate the syntax of contents passed from STDIN:
63+
You can validate the syntax of contents passed from STDIN:
6464
65-
<info>cat filename | php %command.full_name% -</info>
65+
<info>cat filename | php %command.full_name% -</info>
6666
67-
Or the syntax of a file:
67+
Or the syntax of a file:
6868
69-
<info>php %command.full_name% filename</info>
69+
<info>php %command.full_name% filename</info>
7070
71-
Or of a whole directory:
71+
Or of a whole directory:
7272
73-
<info>php %command.full_name% dirname</info>
73+
<info>php %command.full_name% dirname</info>
7474
75-
The <info>--format</info> option specifies the format of the command output:
75+
The <info>--format</info> option specifies the format of the command output:
7676
77-
<info>php %command.full_name% dirname --format=json</info>
78-
EOF
77+
<info>php %command.full_name% dirname --format=json</info>
78+
EOF
7979
)
8080
;
8181
}

Tests/Command/DebugCommandTest.php

Lines changed: 79 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -95,24 +95,24 @@ public static function getDebugTemplateNameTestData()
9595
'input' => ['name' => 'base.html.twig'],
9696
'output' => <<<TXT
9797
98-
Matched File
99-
------------
98+
Matched File
99+
------------
100100
101-
Template name "base.html.twig" not found%A
101+
Template name "base.html.twig" not found%A
102102
103-
Configured Paths
104-
----------------
103+
Configured Paths
104+
----------------
105105
106-
No template paths configured for your application%s
106+
No template paths configured for your application%s
107107
108-
----------- -------------------------------------%A
109-
Namespace Paths%A
110-
----------- -------------------------------------%A
111-
@Twig vendors/twig-bundle/Resources/views%e%A
112-
----------- -------------------------------------%A
108+
----------- -------------------------------------%A
109+
Namespace Paths%A
110+
----------- -------------------------------------%A
111+
@Twig vendors/twig-bundle/Resources/views%e%A
112+
----------- -------------------------------------%A
113113
114114
115-
TXT
115+
TXT
116116
,
117117
'paths' => ['vendors/twig-bundle/Resources/views/' => 'Twig'],
118118
];
@@ -121,27 +121,27 @@ public static function getDebugTemplateNameTestData()
121121
'input' => ['name' => '@App/foo.html.twig'],
122122
'output' => <<<TXT
123123
124-
Matched File
125-
------------
124+
Matched File
125+
------------
126126
127-
Template name "@App/foo.html.twig" not found%A
127+
Template name "@App/foo.html.twig" not found%A
128128
129-
Configured Paths
130-
----------------
129+
Configured Paths
130+
----------------
131131
132-
No template paths configured for "@App" namespace%A
132+
No template paths configured for "@App" namespace%A
133133
134-
----------- -------------------------------------%A
135-
Namespace Paths%A
136-
----------- -------------------------------------%A
137-
(None) templates%e%A
138-
%A
139-
@Twig templates/bundles/TwigBundle%e%A
140-
vendors/twig-bundle/Resources/views%e%A
141-
----------- -------------------------------------%A
134+
----------- -------------------------------------%A
135+
Namespace Paths%A
136+
----------- -------------------------------------%A
137+
(None) templates%e%A
138+
%A
139+
@Twig templates/bundles/TwigBundle%e%A
140+
vendors/twig-bundle/Resources/views%e%A
141+
----------- -------------------------------------%A
142142
143143
144-
TXT
144+
TXT
145145
,
146146
'paths' => $defaultPaths,
147147
];
@@ -150,22 +150,22 @@ public static function getDebugTemplateNameTestData()
150150
'input' => ['name' => 'base.html.twig'],
151151
'output' => <<<TXT
152152
153-
Matched File
154-
------------
153+
Matched File
154+
------------
155155
156-
[OK] templates%ebase.html.twig%A
156+
[OK] templates%ebase.html.twig%A
157157
158-
Configured Paths
159-
----------------
158+
Configured Paths
159+
----------------
160160
161-
----------- ------------%A
162-
Namespace Paths%A
163-
----------- ------------%A
164-
(None) templates%e%A
165-
----------- ------------%A
161+
----------- ------------%A
162+
Namespace Paths%A
163+
----------- ------------%A
164+
(None) templates%e%A
165+
----------- ------------%A
166166
167167
168-
TXT
168+
TXT
169169
,
170170
'paths' => $defaultPaths,
171171
];
@@ -174,28 +174,28 @@ public static function getDebugTemplateNameTestData()
174174
'input' => ['name' => '@Twig/error.html.twig'],
175175
'output' => <<<TXT
176176
177-
Matched File
178-
------------
177+
Matched File
178+
------------
179179
180-
[OK] templates%ebundles%eTwigBundle%eerror.html.twig%A
180+
[OK] templates%ebundles%eTwigBundle%eerror.html.twig%A
181181
182-
Overridden Files
183-
----------------
182+
Overridden Files
183+
----------------
184184
185-
* vendors%etwig-bundle%eResources%eviews%eerror.html.twig
185+
* vendors%etwig-bundle%eResources%eviews%eerror.html.twig
186186
187-
Configured Paths
188-
----------------
187+
Configured Paths
188+
----------------
189189
190-
----------- --------------------------------------
191-
Namespace Paths%A
192-
----------- --------------------------------------
193-
@Twig templates/bundles/TwigBundle%e%A
194-
vendors/twig-bundle/Resources/views%e%A
195-
----------- --------------------------------------
190+
----------- --------------------------------------
191+
Namespace Paths%A
192+
----------- --------------------------------------
193+
@Twig templates/bundles/TwigBundle%e%A
194+
vendors/twig-bundle/Resources/views%e%A
195+
----------- --------------------------------------
196196
197197
198-
TXT
198+
TXT
199199
,
200200
'paths' => $defaultPaths,
201201
];
@@ -204,21 +204,21 @@ public static function getDebugTemplateNameTestData()
204204
'input' => ['name' => '@Twg/error.html.twig'],
205205
'output' => <<<TXT
206206
207-
Matched File
208-
------------
207+
Matched File
208+
------------
209209
210-
Template name "@Twg/error.html.twig" not found%A
210+
Template name "@Twg/error.html.twig" not found%A
211211
212-
Configured Paths
213-
----------------
212+
Configured Paths
213+
----------------
214214
215-
No template paths configured for "@Twg" namespace%A
216-
%A
217-
%wDid you mean this?%A
218-
%w@Twig%A
215+
No template paths configured for "@Twg" namespace%A
216+
%A
217+
%wDid you mean this?%A
218+
%w@Twig%A
219219
220220
221-
TXT
221+
TXT
222222
,
223223
'paths' => $defaultPaths,
224224
];
@@ -227,27 +227,27 @@ public static function getDebugTemplateNameTestData()
227227
'input' => ['name' => '@Twig/eror.html.twig'],
228228
'output' => <<<TXT
229229
230-
Matched File
231-
------------
230+
Matched File
231+
------------
232232
233-
Template name "@Twig/eror.html.twig" not found%A
234-
%A
235-
%wDid you mean one of these?%A
236-
%w@Twig/base.html.twig%A
237-
%w@Twig/error.html.twig%A
233+
Template name "@Twig/eror.html.twig" not found%A
234+
%A
235+
%wDid you mean one of these?%A
236+
%w@Twig/base.html.twig%A
237+
%w@Twig/error.html.twig%A
238238
239-
Configured Paths
240-
----------------
239+
Configured Paths
240+
----------------
241241
242-
----------- --------------------------------------
243-
Namespace Paths
244-
----------- --------------------------------------
245-
@Twig templates/bundles/TwigBundle%e%A
246-
vendors/twig-bundle/Resources/views%e%A
247-
----------- --------------------------------------
242+
----------- --------------------------------------
243+
Namespace Paths
244+
----------- --------------------------------------
245+
@Twig templates/bundles/TwigBundle%e%A
246+
vendors/twig-bundle/Resources/views%e%A
247+
----------- --------------------------------------
248248
249249
250-
TXT
250+
TXT
251251
,
252252
'paths' => $defaultPaths,
253253
];

Tests/Extension/FormExtensionBootstrap3LayoutTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ public function testMoneyWidgetInIso()
6969
;
7070

7171
$this->assertSame(<<<'HTML'
72-
<div class="input-group">
73-
<span class="input-group-addon">&euro; </span>
74-
<input type="text" id="name" name="name" required="required" class="form-control" /> </div>
75-
HTML
72+
<div class="input-group">
73+
<span class="input-group-addon">&euro; </span>
74+
<input type="text" id="name" name="name" required="required" class="form-control" /> </div>
75+
HTML
7676
, trim($this->renderWidget($view)));
7777
}
7878

Tests/Extension/FormExtensionBootstrap4LayoutTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ public function testMoneyWidgetInIso()
7474
;
7575

7676
$this->assertSame(<<<'HTML'
77-
<div class="input-group "><div class="input-group-prepend">
78-
<span class="input-group-text">&euro; </span>
79-
</div><input type="text" id="name" name="name" required="required" class="form-control" /></div>
80-
HTML
77+
<div class="input-group "><div class="input-group-prepend">
78+
<span class="input-group-text">&euro; </span>
79+
</div><input type="text" id="name" name="name" required="required" class="form-control" /></div>
80+
HTML
8181
, trim($this->renderWidget($view)));
8282
}
8383

Tests/Extension/FormExtensionBootstrap5LayoutTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ public function testMoneyWidgetInIso()
7575
->createView();
7676

7777
self::assertSame(<<<'HTML'
78-
<div class="input-group "><span class="input-group-text">&euro; </span><input type="text" id="name" name="name" required="required" class="form-control" /></div>
79-
HTML
78+
<div class="input-group "><span class="input-group-text">&euro; </span><input type="text" id="name" name="name" required="required" class="form-control" /></div>
79+
HTML
8080
, trim($this->renderWidget($view)));
8181
}
8282

Tests/Extension/HttpKernelExtensionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ public function testGenerateFragmentUri()
6969

7070
$loader = new ArrayLoader([
7171
'index' => \sprintf(<<<TWIG
72-
{{ fragment_uri(controller("%s::templateAction", {template: "foo.html.twig"})) }}
73-
TWIG
72+
{{ fragment_uri(controller("%s::templateAction", {template: "foo.html.twig"})) }}
73+
TWIG
7474
, str_replace('\\', '\\\\', TemplateController::class)), ]);
7575
$twig = new Environment($loader, ['debug' => true, 'cache' => false]);
7676
$twig->addExtension(new HttpKernelExtension());

Tests/Mime/BodyRendererTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,13 @@ public function testRenderHtmlOnlyWithLeagueConverter()
5555
public function testRenderMultiLineHtmlOnly()
5656
{
5757
$html = <<<HTML
58-
<head>
59-
<style type="text/css">
60-
css
61-
</style>
62-
</head>
63-
<b>HTML</b>
64-
HTML;
58+
<head>
59+
<style type="text/css">
60+
css
61+
</style>
62+
</head>
63+
<b>HTML</b>
64+
HTML;
6565
$email = $this->prepareEmail(null, $html);
6666
$body = $email->getBody();
6767
$this->assertInstanceOf(AlternativePart::class, $body);

0 commit comments

Comments
 (0)