Issue #3405899 by quietone, smustgrave: Fix spelling of heredoc indentifiers

merge-requests/5709/head
xjm 2023-12-04 17:44:27 -06:00
parent 736386ec07
commit ec3d785eb9
No known key found for this signature in database
GPG Key ID: 206B0B8743BDF4C2
17 changed files with 40 additions and 47 deletions

View File

@ -404,7 +404,7 @@ class DbDumpCommand extends DbCommandBase {
// The template contains an instruction for the file to be ignored by PHPCS.
// This is because the files can be huge and coding standards are
// irrelevant.
$script = <<<'ENDOFSCRIPT'
$script = <<<'END_OF_SCRIPT'
<?php
// phpcs:ignoreFile
/**
@ -430,7 +430,7 @@ if ($connection->databaseType() === 'mysql') {
if ($connection->databaseType() === 'mysql') {
$connection->query("SET sql_mode = '$sql_mode'");
}
ENDOFSCRIPT;
END_OF_SCRIPT;
return $script;
}

View File

@ -168,7 +168,6 @@ colspans
columnschange
comida
commenters
commontest
complote
compositionend
compositionstart
@ -179,7 +178,6 @@ contentblock
contextuals
controlgroup
conv
coretest
corge
countquery
cpio
@ -288,9 +286,6 @@ endcode
endembed
endlink
endmacro
endofheader
endofscript
endpo
endset
endtrans
enim
@ -507,8 +502,6 @@ milli
mimetypes
minifyzombies
minusthick
missingkey
missingkeys
mlfr
mlid
mocktail

View File

@ -47,7 +47,7 @@ class ConfigTranslationInstallTest extends InstallerTestBase {
* Contents for the test .po file.
*/
protected function getPo($langcode) {
return <<<ENDPO
return <<<PO
msgid ""
msgstr ""
@ -59,7 +59,7 @@ msgstr "Anonymous $langcode"
msgid "Language"
msgstr "Language $langcode"
ENDPO;
PO;
}
public function testConfigTranslation() {

View File

@ -65,7 +65,7 @@ abstract class HelpTopicTranslatedTestBase extends BrowserTestBase {
// Create a po file so we don't attempt to download one from
// localize.drupal.org and to have a test translation that will not change.
\Drupal::service('file_system')->mkdir($this->publicFilesDirectory . '/translations', NULL, TRUE);
$contents = <<<ENDPO
$contents = <<<PO
msgid ""
msgstr ""
@ -78,7 +78,7 @@ msgstr "Übersetzung testen."
msgid "Non-word-item to translate."
msgstr "Non-word-german sdfwedrsdf."
ENDPO;
PO;
$version = explode('.', \Drupal::VERSION)[0] . '.0.0';
file_put_contents($this->publicFilesDirectory . "/translations/drupal-{$version}.de.po", $contents);
return $parameters;

View File

@ -46,14 +46,14 @@ class LocaleNonInteractiveInstallTest extends BrowserTestBase {
// Create a po file so we don't attempt to download one from
// localize.drupal.org and to have a test translation that will not change.
\Drupal::service('file_system')->mkdir($this->publicFilesDirectory . '/translations', NULL, TRUE);
$contents = <<<ENDPO
$contents = <<<PO
msgid ""
msgstr ""
msgid "Enter the password that accompanies your username."
msgstr "Geben sie das Passwort für ihren Benutzernamen ein."
ENDPO;
PO;
$version = $this->getVersionStringToTest();
file_put_contents($this->publicFilesDirectory . "/translations/drupal-{$version}.de.po", $contents);
return $parameters;

View File

@ -52,7 +52,7 @@ class UmamiMultilingualInstallTest extends InstallerTestBase {
* Contents for the test .po file.
*/
protected function getPo($langcode) {
return <<<ENDPO
return <<<PO
msgid ""
msgstr ""
@ -68,7 +68,7 @@ msgstr "Language $langcode"
#: Testing site name configuration during the installer.
msgid "Drupal"
msgstr "Drupal"
ENDPO;
PO;
}
}

View File

@ -31,7 +31,7 @@ drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
include_once __DIR__ . '/../includes/utility.inc';
// Output the PHP header.
$output = <<<ENDOFHEADER
$output = <<<END_OF_HEADER
<?php
/**
@ -42,7 +42,7 @@ $output = <<<ENDOFHEADER
* installation of Drupal 6, filled with data using the generate-d6-content.sh
* tool. It has the following modules installed:
ENDOFHEADER;
END_OF_HEADER;
foreach (\Drupal::moduleHandler()->getModuleList() as $module => $filename) {
$output .= " * - $module\n";

View File

@ -32,7 +32,7 @@ drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
include_once dirname(__FILE__) . '/../includes/utility.inc';
// Output the PHP header.
$output = <<<ENDOFHEADER
$output = <<<END_OF_HEADER
<?php
/**
@ -43,7 +43,7 @@ $output = <<<ENDOFHEADER
* installation of Drupal 7, filled with data using the generate-d7-content.sh
* tool. It has the following modules installed:
ENDOFHEADER;
END_OF_HEADER;
foreach (\Drupal::moduleHandler()->getModuleList() as $module => $filename) {
$output .= " * - $module\n";

View File

@ -132,13 +132,13 @@ class DistributionProfileTranslationQueryTest extends InstallerTestBase {
* Contents for the test .po file.
*/
protected function getPo($langcode) {
return <<<ENDPO
return <<<PO
msgid ""
msgstr ""
msgid "Save and continue"
msgstr "Save and continue $langcode"
ENDPO;
PO;
}
}

View File

@ -122,13 +122,13 @@ class DistributionProfileTranslationTest extends InstallerTestBase {
* Contents for the test .po file.
*/
protected function getPo($langcode) {
return <<<ENDPO
return <<<PO
msgid ""
msgstr ""
msgid "Save and continue"
msgstr "Save and continue $langcode"
ENDPO;
PO;
}
}

View File

@ -138,7 +138,7 @@ class InstallerExistingConfigSyncDirectoryMultilingualTest extends InstallerExis
$this->assertEquals($expected_changelist_spanish_collection, $comparer->getChangelist(NULL, 'language.es'));
// Change a translation and ensure configuration is updated.
$po = <<<ENDPO
$po = <<<PO
msgid ""
msgstr ""
@ -148,7 +148,7 @@ msgstr "Anonymous es"
msgid "Apply"
msgstr "Aplicar New"
ENDPO;
PO;
file_put_contents($this->publicFilesDirectory . '/translations/drupal-8.0.0.es.po', $po);
// Manually update the translation status so can re-run the import.
@ -194,7 +194,7 @@ ENDPO;
* Contents for the test .po file.
*/
protected function getPo($langcode) {
return <<<ENDPO
return <<<PO
msgid ""
msgstr ""
@ -204,7 +204,7 @@ msgstr "Anonymous $langcode"
msgid "Apply"
msgstr "Aplicar"
ENDPO;
PO;
}
}

View File

@ -32,10 +32,10 @@ class InstallerTranslationExistingFileTest extends InstallerTestBase {
protected function setUpLanguage() {
// Place custom local translations in the translations directory.
mkdir(DRUPAL_ROOT . '/' . $this->siteDirectory . '/files/translations', 0777, TRUE);
$po_contents = <<<ENDPO
$po_contents = <<<PO
msgid ""
msgstr ""
ENDPO;
PO;
// Create a misnamed translation file that
// \Drupal\Core\StringTranslation\Translator\FileTranslation::findTranslationFiles()
// will not find.

View File

@ -46,7 +46,7 @@ class InstallerTranslationMultipleLanguageNonInteractiveTest extends BrowserTest
* Contents for the test .po file.
*/
protected function getPo($langcode) {
return <<<ENDPO
return <<<PO
msgid ""
msgstr ""
@ -62,7 +62,7 @@ msgstr "Language $langcode"
#: Testing site name configuration during the installer.
msgid "Drupal"
msgstr "Drupal"
ENDPO;
PO;
}
/**

View File

@ -43,7 +43,7 @@ class InstallerTranslationMultipleLanguageTest extends InstallerTestBase {
* Contents for the test .po file.
*/
protected function getPo($langcode) {
return <<<ENDPO
return <<<PO
msgid ""
msgstr ""
@ -59,7 +59,7 @@ msgstr "Language $langcode"
#: Testing site name configuration during the installer.
msgid "Drupal"
msgstr "Drupal"
ENDPO;
PO;
}
/**

View File

@ -75,13 +75,13 @@ class InstallerTranslationQueryTest extends InstallerTestBase {
* Contents for the test .po file.
*/
protected function getPo($langcode) {
return <<<ENDPO
return <<<PO
msgid ""
msgstr ""
msgid "Save and continue"
msgstr "Save and continue $langcode"
ENDPO;
PO;
}
}

View File

@ -153,7 +153,7 @@ class InstallerTranslationTest extends InstallerTestBase {
* Contents for the test .po file.
*/
protected function getPo($langcode) {
return <<<ENDPO
return <<<PO
msgid ""
msgstr ""
@ -168,7 +168,7 @@ msgstr "Beheben Sie alle Probleme unten, um die Installation fortzusetzen. Infor
msgid "Failed to <strong>CREATE</strong> a test table on your database server with the command %query. The server reports the following message: %error.<p>Are you sure the configured username has the necessary permissions to create tables in the database?</p>"
msgstr "<strong>CREATE</strong> ein Test-Tabelle auf Ihrem Datenbankserver mit dem Befehl %query fehlgeschlagen."
ENDPO;
PO;
}
}

View File

@ -86,13 +86,13 @@ BROKEN_INFO;
* @covers ::parse
*/
public function testInfoParserMissingKeys() {
$missing_keys = <<<MISSINGKEYS
$missing_keys = <<<MISSING_KEYS
# info.yml for testing missing name, description, and type keys.
package: Core
version: VERSION
dependencies:
- field
MISSINGKEYS;
MISSING_KEYS;
vfsStream::setup('modules');
vfsStream::create([
@ -173,7 +173,7 @@ MISSING_CORE_VERSION_REQUIREMENT;
* @covers ::parse
*/
public function testInfoParserMissingKey() {
$missing_key = <<<MISSINGKEY
$missing_key = <<<MISSING_KEY
# info.yml for testing missing type key.
name: File
description: 'Defines a file field type.'
@ -181,7 +181,7 @@ package: Core
version: VERSION
dependencies:
- field
MISSINGKEY;
MISSING_KEY;
vfsStream::setup('modules');
vfsStream::create([
@ -210,7 +210,7 @@ MISSINGKEY;
* @covers ::parse
*/
public function testInfoParserCommonInfo() {
$common = <<<COMMONTEST
$common = <<<COMMON
core_version_requirement: '*'
name: common_test
type: module
@ -218,7 +218,7 @@ description: 'testing info file parsing'
simple_string: 'A simple string'
version: "VERSION"
double_colon: dummyClassName::method
COMMONTEST;
COMMON;
vfsStream::setup('modules');
@ -243,12 +243,12 @@ COMMONTEST;
* @covers ::parse
*/
public function testInfoParserCoreInfo() {
$common = <<<CORETEST
$common = <<<CORE
name: core_test
type: module
version: "VERSION"
description: 'testing info file parsing'
CORETEST;
CORE;
vfsStream::setup('core');