Skip to content

Commit 2ff6cd7

Browse files
Merge pull request #19814 from MoonE/heredoc-indent
Indent heredocs
2 parents 7816c49 + 8286d5c commit 2ff6cd7

17 files changed

Lines changed: 1046 additions & 1049 deletions

src/Command/SetVersionCommand.php

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,33 @@
1919
final class SetVersionCommand extends Command
2020
{
2121
private static string $generatedClassTemplate = <<<'PHP'
22-
<?php
23-
24-
declare(strict_types=1);
25-
26-
namespace PhpMyAdmin;
27-
28-
use const VERSION_SUFFIX;
29-
30-
/**
31-
* This class is generated by bin/console.
32-
*
33-
* @see \PhpMyAdmin\Command\SetVersionCommand
34-
*/
35-
final class Version
36-
{
37-
// The VERSION_SUFFIX constant is defined at ./app/constants.php
38-
public const VERSION = '%1$u.%2$u.%3$u%4$s' . VERSION_SUFFIX;
39-
public const SERIES = '%1$u.%2$u';
40-
public const MAJOR = %1$u;
41-
public const MINOR = %2$u;
42-
public const PATCH = %3$u;
43-
public const ID = %1$u%2$02u%3$02u;
44-
public const PRE_RELEASE_NAME = '%5$s';
45-
public const IS_DEV = %6$s;
46-
}
22+
<?php
23+
24+
declare(strict_types=1);
25+
26+
namespace PhpMyAdmin;
27+
28+
use const VERSION_SUFFIX;
29+
30+
/**
31+
* This class is generated by bin/console.
32+
*
33+
* @see \PhpMyAdmin\Command\SetVersionCommand
34+
*/
35+
final class Version
36+
{
37+
// The VERSION_SUFFIX constant is defined at ./app/constants.php
38+
public const VERSION = '%1$u.%2$u.%3$u%4$s' . VERSION_SUFFIX;
39+
public const SERIES = '%1$u.%2$u';
40+
public const MAJOR = %1$u;
41+
public const MINOR = %2$u;
42+
public const PATCH = %3$u;
43+
public const ID = %1$u%2$02u%3$02u;
44+
public const PRE_RELEASE_NAME = '%5$s';
45+
public const IS_DEV = %6$s;
46+
}
4747

48-
PHP;
48+
PHP;
4949

5050
protected function configure(): void
5151
{

src/Command/WriteGitRevisionCommand.php

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,35 @@
2424
class WriteGitRevisionCommand extends Command
2525
{
2626
private static string $generatedClassTemplate = <<<'PHP'
27-
<?php
28-
29-
declare(strict_types=1);
30-
31-
/**
32-
* This file is generated by bin/console.
33-
*
34-
* @see \PhpMyAdmin\Command\WriteGitRevisionCommand
35-
*/
36-
return [
37-
'revision' => '%s',
38-
'revisionHash' => '%s',
39-
'revisionUrl' => '%s',
40-
'branch' => '%s',
41-
'branchUrl' => '%s',
42-
'message' => '%s',
43-
'author' => [
44-
'name' => '%s',
45-
'email' => '%s',
46-
'date' => '%s',
47-
],
48-
'committer' => [
49-
'name' => '%s',
50-
'email' => '%s',
51-
'date' => '%s',
52-
],
53-
];
54-
55-
PHP;
27+
<?php
28+
29+
declare(strict_types=1);
30+
31+
/**
32+
* This file is generated by bin/console.
33+
*
34+
* @see \PhpMyAdmin\Command\WriteGitRevisionCommand
35+
*/
36+
return [
37+
'revision' => '%s',
38+
'revisionHash' => '%s',
39+
'revisionUrl' => '%s',
40+
'branch' => '%s',
41+
'branchUrl' => '%s',
42+
'message' => '%s',
43+
'author' => [
44+
'name' => '%s',
45+
'email' => '%s',
46+
'date' => '%s',
47+
],
48+
'committer' => [
49+
'name' => '%s',
50+
'email' => '%s',
51+
'date' => '%s',
52+
],
53+
];
54+
55+
PHP;
5656

5757
protected function configure(): void
5858
{

src/OpenDocument.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
class OpenDocument
1818
{
1919
public const NS = <<<'EOT'
20-
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
21-
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
22-
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
23-
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
24-
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
25-
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
26-
EOT;
20+
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0"
21+
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0"
22+
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0"
23+
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0"
24+
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"
25+
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"
26+
EOT;
2727

2828
/**
2929
* Minimalistic creator of OASIS OpenDocument

tests/end-to-end/TestBase.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1003,11 +1003,11 @@ public function scrollIntoView(string $elementId, int $yOffset = 70): void
10031003
{
10041004
// 70pt offset by-default so that the topmenu does not cover the element
10051005
$script = <<<'JS'
1006-
const elementId = arguments[0];
1007-
const yOffset = arguments[1];
1008-
const position = document.getElementById(elementId).getBoundingClientRect();
1009-
window.scrollBy({left: 0, top: position.top - yOffset, behavior: 'instant'});
1010-
JS;
1006+
const elementId = arguments[0];
1007+
const yOffset = arguments[1];
1008+
const position = document.getElementById(elementId).getBoundingClientRect();
1009+
window.scrollBy({left: 0, top: position.top - yOffset, behavior: 'instant'});
1010+
JS;
10111011
$this->webDriver->executeScript($script, [$elementId, $yOffset]);
10121012
}
10131013

@@ -1021,10 +1021,10 @@ public function scrollIntoView(string $elementId, int $yOffset = 70): void
10211021
public function scrollToElement(WebDriverElement $element, int $xOffset = 0, int $yOffset = 0): void
10221022
{
10231023
$script = <<<'JS'
1024-
const leftValue = arguments[0];
1025-
const topValue = arguments[1];
1026-
window.scrollBy({left: leftValue, top: topValue, behavior: 'instant'});
1027-
JS;
1024+
const leftValue = arguments[0];
1025+
const topValue = arguments[1];
1026+
window.scrollBy({left: leftValue, top: topValue, behavior: 'instant'});
1027+
JS;
10281028
$this->webDriver->executeScript($script, [
10291029
$element->getLocation()->getX() + $xOffset,
10301030
$element->getLocation()->getY() + $yOffset,
@@ -1037,8 +1037,8 @@ public function scrollToElement(WebDriverElement $element, int $xOffset = 0, int
10371037
public function scrollToBottom(): void
10381038
{
10391039
$script = <<<'JS'
1040-
window.scrollTo({left: 0, top: document.body.scrollHeight, behavior: 'instant'});
1041-
JS;
1040+
window.scrollTo({left: 0, top: document.body.scrollHeight, behavior: 'instant'});
1041+
JS;
10421042
$this->webDriver->executeScript($script);
10431043
}
10441044

tests/unit/Command/SetVersionCommandTest.php

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -177,29 +177,26 @@ public function testGetGeneratedClassValidVersion(string $version, string $conte
177177
[$version],
178178
);
179179
$template = <<<'PHP'
180-
<?php
180+
<?php
181181
182-
declare(strict_types=1);
182+
declare(strict_types=1);
183183
184-
namespace PhpMyAdmin;
184+
namespace PhpMyAdmin;
185185
186-
use const VERSION_SUFFIX;
186+
use const VERSION_SUFFIX;
187187
188-
/**
189-
* This class is generated by bin/console.
190-
*
191-
* @see \PhpMyAdmin\Command\SetVersionCommand
192-
*/
193-
final class Version
194-
{
195-
// The VERSION_SUFFIX constant is defined at ./app/constants.php
196-
%s
197-
}
188+
/**
189+
* This class is generated by bin/console.
190+
*
191+
* @see \PhpMyAdmin\Command\SetVersionCommand
192+
*/
193+
final class Version
194+
{
195+
// The VERSION_SUFFIX constant is defined at ./app/constants.php
196+
%s
197+
}
198198

199-
PHP;
200-
self::assertSame(
201-
sprintf($template, $content),
202-
$output,
203-
);
199+
PHP;
200+
self::assertSame(sprintf($template, $content), $output);
204201
}
205202
}

tests/unit/Command/WriteGitRevisionCommandTest.php

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -69,35 +69,35 @@ public function testGetGeneratedClassValidVersion(): void
6969
],
7070
);
7171
$template = <<<'PHP'
72-
<?php
72+
<?php
7373
74-
declare(strict_types=1);
74+
declare(strict_types=1);
7575
76-
/**
77-
* This file is generated by bin/console.
78-
*
79-
* @see \PhpMyAdmin\Command\WriteGitRevisionCommand
80-
*/
81-
return [
82-
'revision' => '%s',
83-
'revisionHash' => '%s',
84-
'revisionUrl' => '%s',
85-
'branch' => '%s',
86-
'branchUrl' => '%s',
87-
'message' => '%s',
88-
'author' => [
89-
'name' => '%s',
90-
'email' => '%s',
91-
'date' => '%s',
92-
],
93-
'committer' => [
94-
'name' => '%s',
95-
'email' => '%s',
96-
'date' => '%s',
97-
],
98-
];
76+
/**
77+
* This file is generated by bin/console.
78+
*
79+
* @see \PhpMyAdmin\Command\WriteGitRevisionCommand
80+
*/
81+
return [
82+
'revision' => '%s',
83+
'revisionHash' => '%s',
84+
'revisionUrl' => '%s',
85+
'branch' => '%s',
86+
'branchUrl' => '%s',
87+
'message' => '%s',
88+
'author' => [
89+
'name' => '%s',
90+
'email' => '%s',
91+
'date' => '%s',
92+
],
93+
'committer' => [
94+
'name' => '%s',
95+
'email' => '%s',
96+
'date' => '%s',
97+
],
98+
];
9999

100-
PHP;
100+
PHP;
101101
self::assertSame(sprintf(
102102
$template,
103103
'RELEASE_5_1_0-638-g1c018e2a6c',

tests/unit/ConfigTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ public function testLoadConfigs(): void
101101
self::assertEquals($defaultConfig->getSettings(), $config->getSettings());
102102

103103
$contents = <<<'PHP'
104-
<?php
105-
$cfg['environment'] = 'development';
106-
$cfg['UnknownKey'] = true;
107-
PHP;
104+
<?php
105+
$cfg['environment'] = 'development';
106+
$cfg['UnknownKey'] = true;
107+
PHP;
108108
file_put_contents($tmpConfig, $contents);
109109

110110
// Test loading a config changes the setup

0 commit comments

Comments
 (0)