diff --git a/core/lib/Drupal/Core/Database/StatementEmpty.php b/core/lib/Drupal/Core/Database/StatementEmpty.php
index 8b4b38e..834c7f3 100644
--- a/core/lib/Drupal/Core/Database/StatementEmpty.php
+++ b/core/lib/Drupal/Core/Database/StatementEmpty.php
@@ -50,7 +50,6 @@ public function rowCount() {
    * {@inheritdoc}
    */
   public function setFetchMode($mode, $a1 = NULL, $a2 = []) {
-    return;
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Entity/EntityListBuilder.php b/core/lib/Drupal/Core/Entity/EntityListBuilder.php
index 7191fae..40a0407 100644
--- a/core/lib/Drupal/Core/Entity/EntityListBuilder.php
+++ b/core/lib/Drupal/Core/Entity/EntityListBuilder.php
@@ -248,7 +248,6 @@ public function render() {
    * Gets the title of the page.
    */
   protected function getTitle() {
-    return;
   }
 
   /**
diff --git a/core/modules/config/tests/config_import_test/config_import_test.module b/core/modules/config/tests/config_import_test/config_import_test.module
index 6ec1d93..93ac04d 100644
--- a/core/modules/config/tests/config_import_test/config_import_test.module
+++ b/core/modules/config/tests/config_import_test/config_import_test.module
@@ -21,5 +21,4 @@ function config_import_test_config_import_steps_alter(&$sync_steps) {
 function _config_import_test_config_import_steps_alter(&$context) {
   $GLOBALS['hook_config_test']['config_import_steps_alter'] = TRUE;
   $context['finished'] = 1;
-  return;
 }
diff --git a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php
index 04da0f5..d6cf21c 100644
--- a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php
+++ b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeForm.php
@@ -976,7 +976,6 @@ public function getCancelUrl() {
   public function getDescription() {
     // The description is added by the buildConfirmForm() method.
     // @see \Drupal\migrate_drupal_ui\Form\MigrateUpgradeForm::buildConfirmForm()
-    return;
   }
 
   /**
diff --git a/core/modules/node/src/Plugin/migrate/source/d7/NodeType.php b/core/modules/node/src/Plugin/migrate/source/d7/NodeType.php
index 44f0b5e..e64b989 100644
--- a/core/modules/node/src/Plugin/migrate/source/d7/NodeType.php
+++ b/core/modules/node/src/Plugin/migrate/source/d7/NodeType.php
@@ -40,7 +40,7 @@ public function query() {
    * {@inheritdoc}
    */
   public function fields() {
-    return [
+    $fields = [
       'type' => $this->t('Machine name of the node type.'),
       'name' => $this->t('Human name of the node type.'),
       'description' => $this->t('Description of the node type.'),
diff --git a/core/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php b/core/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php
index 48e5784..59e0e0a 100644
--- a/core/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php
+++ b/core/modules/system/tests/src/Functional/FileTransfer/TestFileTransfer.php
@@ -61,7 +61,6 @@ public function isFile($path) {
   }
 
   public function chmodJailed($path, $mode, $recursive) {
-    return;
   }
 
 }
diff --git a/core/modules/views/tests/src/Kernel/ModuleTest.php b/core/modules/views/tests/src/Kernel/ModuleTest.php
index 9fe9df6..9d1fcc1 100644
--- a/core/modules/views/tests/src/Kernel/ModuleTest.php
+++ b/core/modules/views/tests/src/Kernel/ModuleTest.php
@@ -81,35 +81,33 @@ public function testViewsGetHandler() {
 
     // @todo Reinstate these tests when the debug() in views_get_handler() is
     //   restored.
-    return;
-
     // Test non-existent tables/fields.
-    set_error_handler([$this, 'customErrorHandler']);
-    $item = [
-      'table' => 'views_test_data',
-      'field' => 'field_invalid',
-    ];
-    $this->container->get('plugin.manager.views.field')->getHandler($item);
-    $this->assertTrue(strpos($this->lastErrorMessage, format_string("Missing handler: @table @field @type", ['@table' => 'views_test_data', '@field' => 'field_invalid', '@type' => 'field'])) !== FALSE, 'An invalid field name throws a debug message.');
-    unset($this->lastErrorMessage);
-
-    $item = [
-      'table' => 'table_invalid',
-      'field' => 'id',
-    ];
-    $this->container->get('plugin.manager.views.filter')->getHandler($item);
-    $this->assertEqual(strpos($this->lastErrorMessage, format_string("Missing handler: @table @field @type", ['@table' => 'table_invalid', '@field' => 'id', '@type' => 'filter'])) !== FALSE, 'An invalid table name throws a debug message.');
-    unset($this->lastErrorMessage);
-
-    $item = [
-      'table' => 'table_invalid',
-      'field' => 'id',
-    ];
-    $this->container->get('plugin.manager.views.filter')->getHandler($item);
-    $this->assertEqual(strpos($this->lastErrorMessage, format_string("Missing handler: @table @field @type", ['@table' => 'table_invalid', '@field' => 'id', '@type' => 'filter'])) !== FALSE, 'An invalid table name throws a debug message.');
-    unset($this->lastErrorMessage);
-
-    restore_error_handler();
+    // set_error_handler([$this, 'customErrorHandler']);
+    // $item = [
+    //   'table' => 'views_test_data',
+    //   'field' => 'field_invalid',
+    // ];
+    // $this->container->get('plugin.manager.views.field')->getHandler($item);
+    // $this->assertTrue(strpos($this->lastErrorMessage, format_string("Missing handler: @table @field @type", ['@table' => 'views_test_data', '@field' => 'field_invalid', '@type' => 'field'])) !== FALSE, 'An invalid field name throws a debug message.');
+    // unset($this->lastErrorMessage);
+    //
+    // $item = [
+    //   'table' => 'table_invalid',
+    //   'field' => 'id',
+    // ];
+    // $this->container->get('plugin.manager.views.filter')->getHandler($item);
+    // $this->assertEqual(strpos($this->lastErrorMessage, format_string("Missing handler: @table @field @type", ['@table' => 'table_invalid', '@field' => 'id', '@type' => 'filter'])) !== FALSE, 'An invalid table name throws a debug message.');
+    // unset($this->lastErrorMessage);
+    //
+    // $item = [
+    //   'table' => 'table_invalid',
+    //   'field' => 'id',
+    // ];
+    // $this->container->get('plugin.manager.views.filter')->getHandler($item);
+    // $this->assertEqual(strpos($this->lastErrorMessage, format_string("Missing handler: @table @field @type", ['@table' => 'table_invalid', '@field' => 'id', '@type' => 'filter'])) !== FALSE, 'An invalid table name throws a debug message.');
+    // unset($this->lastErrorMessage);
+    //
+    // restore_error_handler();
   }
 
   /**
diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist
index 7dcb3ba..1659e48 100644
--- a/core/phpcs.xml.dist
+++ b/core/phpcs.xml.dist
@@ -290,6 +290,7 @@
     <severity>0</severity>
   </rule>
   <rule ref="Squiz.PHP.LowercasePHPFunctions"/>
+  <rule ref="Squiz.PHP.NonExecutableCode"/>
   <rule ref="Squiz.Strings.ConcatenationSpacing">
     <properties>
       <property name="spacing" value="1"/>
diff --git a/core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php b/core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php
index 4692dff..8e5de1d 100644
--- a/core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php
+++ b/core/tests/Drupal/Tests/Core/Database/Stub/StubConnection.php
@@ -52,7 +52,6 @@ public function databaseType() {
    * {@inheritdoc}
    */
   public function createDatabase($database) {
-    return;
   }
 
   /**
