diff --git a/core/lib/Drupal/Core/Command/DbDumpCommand.php b/core/lib/Drupal/Core/Command/DbDumpCommand.php
index 95e9906..19604c1 100644
--- a/core/lib/Drupal/Core/Command/DbDumpCommand.php
+++ b/core/lib/Drupal/Core/Command/DbDumpCommand.php
@@ -375,8 +375,12 @@ protected function getFieldOrder(Connection $connection, $table) {
    *   The template for the generated PHP script.
    */
   protected function getTemplate() {
+    // 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'
 <?php
+// @codingStandardsIgnoreFile
 /**
  * @file
  * A database agnostic dump for testing purposes.
diff --git a/core/modules/migrate_drupal/tests/fixtures/drupal6.php b/core/modules/migrate_drupal/tests/fixtures/drupal6.php
index aa60d81..f7d64f3 100644
--- a/core/modules/migrate_drupal/tests/fixtures/drupal6.php
+++ b/core/modules/migrate_drupal/tests/fixtures/drupal6.php
@@ -1,4 +1,5 @@
 <?php
+// @codingStandardsIgnoreFile
 /**
  * @file
  * A database agnostic dump for testing purposes.
diff --git a/core/modules/migrate_drupal/tests/fixtures/drupal7.php b/core/modules/migrate_drupal/tests/fixtures/drupal7.php
index 15ca130..fb307f0 100644
--- a/core/modules/migrate_drupal/tests/fixtures/drupal7.php
+++ b/core/modules/migrate_drupal/tests/fixtures/drupal7.php
@@ -1,4 +1,5 @@
 <?php
+// @codingStandardsIgnoreFile
 /**
  * @file
  * A database agnostic dump for testing purposes.
diff --git a/core/modules/system/tests/src/Kernel/Scripts/DbDumpCommandTest.php b/core/modules/system/tests/src/Kernel/Scripts/DbDumpCommandTest.php
index 118ea8b..885314e 100644
--- a/core/modules/system/tests/src/Kernel/Scripts/DbDumpCommandTest.php
+++ b/core/modules/system/tests/src/Kernel/Scripts/DbDumpCommandTest.php
@@ -58,6 +58,7 @@ public function testDbDumpCommand() {
     $this->assertContains("'name' => 'test", $output, 'Insert name field found');
     $this->assertContains("'path' => 'test", $output, 'Insert path field found');
     $this->assertContains("'pattern_outline' => 'test", $output, 'Insert pattern_outline field found');
+    $this->assertContains("// @codingStandardsIgnoreFile", $output);
   }
 
   /**
