diff --git a/core/includes/batch.inc b/core/includes/batch.inc
index f84c01b..130a73d 100644
--- a/core/includes/batch.inc
+++ b/core/includes/batch.inc
@@ -118,7 +118,6 @@ function _batch_progress_page() {
}
else {
// This is one of the later requests; do some processing first.
-
// Error handling: if PHP dies due to a fatal error (e.g. a nonexistent
// function), it will output whatever is in the output buffer, followed by
// the error message.
@@ -289,7 +288,6 @@ function _batch_process() {
if ($batch['progressive']) {
// Gather progress information.
-
// Reporting 100% progress will cause the whole batch to be considered
// processed. If processing was paused right after moving to a new set,
// we have to use the info from the new (unprocessed) set.
diff --git a/core/includes/errors.inc b/core/includes/errors.inc
index b96b828..1629444 100644
--- a/core/includes/errors.inc
+++ b/core/includes/errors.inc
@@ -228,7 +228,6 @@ function _drupal_log_error($error, $fatal = FALSE) {
if ($error_level != ERROR_REPORTING_DISPLAY_VERBOSE) {
// Without verbose logging, use a simple message.
-
// We call SafeMarkup::format() directly here, rather than use t() since
// we are in the middle of error handling, and we don't want t() to
// cause further errors.
@@ -236,7 +235,6 @@ function _drupal_log_error($error, $fatal = FALSE) {
}
else {
// With verbose logging, we will also include a backtrace.
-
// First trace is the error itself, already contained in the message.
// While the second trace is the error source and also contained in the
// message, the message doesn't contain argument values, so we output it
diff --git a/core/includes/pager.inc b/core/includes/pager.inc
index 6b6bbb7..dfbc92b 100644
--- a/core/includes/pager.inc
+++ b/core/includes/pager.inc
@@ -199,7 +199,6 @@ function template_preprocess_pager(&$variables) {
// max is the maximum page number.
$pager_max = $pager_total[$element];
// End of marker calculations.
-
// Prepare for generation loop.
$i = $pager_first;
if ($pager_last > $pager_max) {
@@ -213,7 +212,6 @@ function template_preprocess_pager(&$variables) {
$i = 1;
}
// End of generation loop preparation.
-
// Create the "first" and "previous" links if we are not on the first page.
if ($pager_page_array[$element] > 0) {
$items['first'] = array();
diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 9b89250..d4e2fcf 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -446,7 +446,6 @@ function theme_render_and_autoescape($arg) {
// This is a normal render array, which is safe by definition, with special
// simple cases already handled.
-
// Early return if this element was pre-rendered (no need to re-render).
if (isset($arg['#printed']) && $arg['#printed'] == TRUE && isset($arg['#markup']) && strlen($arg['#markup']) > 0) {
return (string) $arg['#markup'];
@@ -1407,7 +1406,6 @@ function theme_get_suggestions($args, $base, $delimiter = '__') {
// page__node__%
// page__node__1
// page__node__edit
-
$suggestions = array();
$prefix = $base;
foreach ($args as $arg) {
diff --git a/core/lib/Drupal/Component/Gettext/PoStreamReader.php b/core/lib/Drupal/Component/Gettext/PoStreamReader.php
index faaa95f..bcceaa2 100644
--- a/core/lib/Drupal/Component/Gettext/PoStreamReader.php
+++ b/core/lib/Drupal/Component/Gettext/PoStreamReader.php
@@ -272,7 +272,6 @@ private function readLine() {
if (!strncmp('#', $line, 1)) {
// Lines starting with '#' are comments.
-
if ($this->_context == 'COMMENT') {
// Already in comment context, add to current comment.
$this->_current_item['#'][] = substr($line, 1);
@@ -297,7 +296,6 @@ private function readLine() {
}
elseif (!strncmp('msgid_plural', $line, 12)) {
// A plural form for the current source string.
-
if ($this->_context != 'MSGID') {
// A plural form can only be added to an msgid directly.
$this->_errors[] = SafeMarkup::format('The translation stream %uri contains an error: "msgid_plural" was expected but not found on line %line.', $log_vars);
@@ -328,7 +326,6 @@ private function readLine() {
}
elseif (!strncmp('msgid', $line, 5)) {
// Starting a new message.
-
if (($this->_context == 'MSGSTR') || ($this->_context == 'MSGSTR_ARR')) {
// We are currently in string context, save current item.
$this->setItemFromArray($this->_current_item);
@@ -359,7 +356,6 @@ private function readLine() {
}
elseif (!strncmp('msgctxt', $line, 7)) {
// Starting a new context.
-
if (($this->_context == 'MSGSTR') || ($this->_context == 'MSGSTR_ARR')) {
// We are currently in string context, save current item.
$this->setItemFromArray($this->_current_item);
@@ -389,7 +385,6 @@ private function readLine() {
}
elseif (!strncmp('msgstr[', $line, 7)) {
// A message string for a specific plurality.
-
if (($this->_context != 'MSGID') &&
($this->_context != 'MSGCTXT') &&
($this->_context != 'MSGID_PLURAL') &&
@@ -431,7 +426,6 @@ private function readLine() {
}
elseif (!strncmp("msgstr", $line, 6)) {
// A string pair for an msgid (with optional context).
-
if (($this->_context != 'MSGID') && ($this->_context != 'MSGCTXT')) {
// Strings are only valid within an id or context scope.
$this->_errors[] = SafeMarkup::format('The translation stream %uri contains an error: "msgstr" is unexpected on line %line.', $log_vars);
@@ -456,7 +450,6 @@ private function readLine() {
}
elseif ($line != '') {
// Anything that is not a token may be a continuation of a previous token.
-
$quoted = $this->parseQuoted($line);
if ($quoted === FALSE) {
// This string must be quoted.
diff --git a/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php b/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
index 96318ac..5a832b9 100644
--- a/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
+++ b/core/lib/Drupal/Component/Plugin/ContextAwarePluginBase.php
@@ -143,7 +143,6 @@ public function validateContexts() {
$violations = new ConstraintViolationList();
// @todo: Implement symfony validator API to let the validator traverse
// and set property paths accordingly.
-
foreach ($this->getContexts() as $context) {
$violations->addAll($context->validate());
}
diff --git a/core/lib/Drupal/Core/Archiver/Tar.php b/core/lib/Drupal/Core/Archiver/Tar.php
index 33f4de6..f3be211 100644
--- a/core/lib/Drupal/Core/Archiver/Tar.php
+++ b/core/lib/Drupal/Core/Archiver/Tar.php
@@ -45,7 +45,6 @@ public function remove($file_path) {
// so we'll have to simulate it somehow, probably by
// creating a new archive with everything but the removed
// file.
-
return $this;
}
diff --git a/core/lib/Drupal/Core/Cache/MemoryBackend.php b/core/lib/Drupal/Core/Cache/MemoryBackend.php
index a0d32bd..8d87eea 100644
--- a/core/lib/Drupal/Core/Cache/MemoryBackend.php
+++ b/core/lib/Drupal/Core/Cache/MemoryBackend.php
@@ -84,7 +84,6 @@ protected function prepareItem($cache, $allow_invalid) {
// We must clone it as part of the preparation step so that the actual
// cache object is not affected by the unserialize() call or other
// manipulations of the returned object.
-
$prepared = clone $cache;
$prepared->data = unserialize($prepared->data);
diff --git a/core/lib/Drupal/Core/Database/Driver/pgsql/Upsert.php b/core/lib/Drupal/Core/Database/Driver/pgsql/Upsert.php
index 9dd4fc2..8012281 100644
--- a/core/lib/Drupal/Core/Database/Driver/pgsql/Upsert.php
+++ b/core/lib/Drupal/Core/Database/Driver/pgsql/Upsert.php
@@ -69,7 +69,6 @@ public function execute() {
$this->insertValues = array();
// Transaction commits here where $transaction looses scope.
-
return TRUE;
}
diff --git a/core/lib/Drupal/Core/Database/Query/Insert.php b/core/lib/Drupal/Core/Database/Query/Insert.php
index a0fa599..66a57f5 100644
--- a/core/lib/Drupal/Core/Database/Query/Insert.php
+++ b/core/lib/Drupal/Core/Database/Query/Insert.php
@@ -100,7 +100,6 @@ public function execute() {
$this->insertValues = array();
// Transaction commits here where $transaction looses scope.
-
return $last_insert_id;
}
diff --git a/core/lib/Drupal/Core/Database/Query/Select.php b/core/lib/Drupal/Core/Database/Query/Select.php
index b269410..49a1ced 100644
--- a/core/lib/Drupal/Core/Database/Query/Select.php
+++ b/core/lib/Drupal/Core/Database/Query/Select.php
@@ -901,7 +901,6 @@ public function __clone() {
// On cloning, also clone the dependent objects. However, we do not
// want to clone the database connection object as that would duplicate the
// connection itself.
-
$this->condition = clone($this->condition);
$this->having = clone($this->having);
foreach ($this->union as $key => $aggregate) {
diff --git a/core/lib/Drupal/Core/Database/StatementInterface.php b/core/lib/Drupal/Core/Database/StatementInterface.php
index 5bc9e48..b3e6fea 100644
--- a/core/lib/Drupal/Core/Database/StatementInterface.php
+++ b/core/lib/Drupal/Core/Database/StatementInterface.php
@@ -38,7 +38,6 @@
* statements). The access type has to be protected.
*/
//protected function __construct(Connection $dbh);
-
/**
* Executes a prepared statement
*
diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php
index 04b56aa..7f4e974 100644
--- a/core/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php
+++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/TaggedHandlersPass.php
@@ -105,7 +105,6 @@ public function process(ContainerBuilder $container) {
}
}
// Determine the ID.
-
if (!isset($interface)) {
throw new LogicException(vsprintf("Service consumer '%s' class method %s::%s() has to type-hint an interface.", array(
$consumer_id,
diff --git a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
index 40557d5..e02b220 100644
--- a/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
+++ b/core/lib/Drupal/Core/DependencyInjection/YamlFileLoader.php
@@ -66,7 +66,6 @@ public function load($file)
// Not supported.
//$this->container->addResource(new FileResource($path));
-
// empty file
if (null === $content) {
return;
@@ -75,7 +74,6 @@ public function load($file)
// imports
// Not supported.
//$this->parseImports($content, $file);
-
// parameters
if (isset($content['parameters'])) {
if (!is_array($content['parameters'])) {
@@ -90,7 +88,6 @@ public function load($file)
// extensions
// Not supported.
//$this->loadFromExtensions($content);
-
// services
$this->parseDefinitions($content, $file);
}
diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index 1c8068b..cd03d97 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -449,7 +449,7 @@ public function boot() {
'cache_backend_configuration' => [],
];
// @todo Use extension_loaded('apcu') for non-testbot
- // https://www.drupal.org/node/2447753.
+ // https://www.drupal.org/node/2447753.
if (function_exists('apcu_fetch')) {
$configuration['default']['cache_backend_class'] = '\Drupal\Component\FileCache\ApcuFileCacheBackend';
}
@@ -927,7 +927,6 @@ public static function bootEnvironment($app_root = NULL) {
// Override PHP settings required for Drupal to work properly.
// sites/default/default.settings.php contains more runtime settings.
// The .htaccess file contains settings that cannot be changed at runtime.
-
// Use session cookies, not transparent sessions that puts the session id in
// the query string.
ini_set('session.use_cookies', '1');
diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
index b5fccbd..a714834 100644
--- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php
+++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php
@@ -472,7 +472,6 @@ protected function getTranslatedField($name, $langcode) {
}
// Non-translatable fields are always stored with
// LanguageInterface::LANGCODE_DEFAULT as key.
-
$default = $langcode == LanguageInterface::LANGCODE_DEFAULT;
if (!$default && !$definition->isTranslatable()) {
if (!isset($this->fields[$name][LanguageInterface::LANGCODE_DEFAULT])) {
@@ -1211,7 +1210,7 @@ public function hasTranslationChanges() {
$translation = $original->getTranslation($this->activeLangcode);
foreach ($this->getFieldDefinitions() as $field_name => $definition) {
// @todo Avoid special-casing the following fields. See
- // https://www.drupal.org/node/2329253.
+ // https://www.drupal.org/node/2329253.
if ($field_name == 'revision_translation_affected' || $field_name == 'revision_id') {
continue;
}
diff --git a/core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php b/core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php
index cfcb5fc..23e4a2b 100644
--- a/core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php
+++ b/core/lib/Drupal/Core/Entity/EntityAccessControlHandler.php
@@ -76,7 +76,6 @@ public function access(EntityInterface $entity, $operation, AccountInterface $ac
// EntityAccessControlHandler::checkAccess(). Entities that have checks that
// need to be done before the hook is invoked should do so by overriding
// this method.
-
// We grant access to the entity if both of these conditions are met:
// - No modules say to deny access.
// - At least one module says to grant access.
@@ -231,7 +230,6 @@ public function createAccess($entity_bundle = NULL, AccountInterface $account =
// EntityAccessControlHandler::checkCreateAccess(). Entities that have
// checks that need to be done before the hook is invoked should do so by
// overriding this method.
-
// We grant access to the entity if both of these conditions are met:
// - No modules say to deny access.
// - At least one module says to grant access.
diff --git a/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php b/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php
index 3ead817..4255d51 100644
--- a/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php
@@ -312,7 +312,6 @@ protected function getChangeList() {
// @todo Support deleting entity definitions when we support base field
// purging. See https://www.drupal.org/node/2282119.
-
$this->entityManager->useCaches(TRUE);
return array_filter($change_list);
diff --git a/core/lib/Drupal/Core/Entity/EntityFieldManager.php b/core/lib/Drupal/Core/Entity/EntityFieldManager.php
index 5337288..54def3c 100644
--- a/core/lib/Drupal/Core/Entity/EntityFieldManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityFieldManager.php
@@ -224,7 +224,7 @@ protected function buildBaseFieldDefinitions($entity_type_id) {
$provider = $entity_type->getProvider();
foreach ($base_field_definitions as $definition) {
// @todo Remove this check once FieldDefinitionInterface exposes a proper
- // provider setter. See https://www.drupal.org/node/2225961.
+ // provider setter. See https://www.drupal.org/node/2225961.
if ($definition instanceof BaseFieldDefinition) {
$definition->setProvider($provider);
}
@@ -238,7 +238,7 @@ protected function buildBaseFieldDefinitions($entity_type_id) {
// defining the field.
foreach ($module_definitions as $field_name => $definition) {
// @todo Remove this check once FieldDefinitionInterface exposes a
- // proper provider setter. See https://www.drupal.org/node/2225961.
+ // proper provider setter. See https://www.drupal.org/node/2225961.
if ($definition instanceof BaseFieldDefinition && $definition->getProvider() == NULL) {
$definition->setProvider($module);
}
@@ -345,7 +345,7 @@ protected function buildBundleFieldDefinitions($entity_type_id, $bundle, array $
$provider = $entity_type->getProvider();
foreach ($bundle_field_definitions as $definition) {
// @todo Remove this check once FieldDefinitionInterface exposes a proper
- // provider setter. See https://www.drupal.org/node/2225961.
+ // provider setter. See https://www.drupal.org/node/2225961.
if ($definition instanceof BaseFieldDefinition) {
$definition->setProvider($provider);
}
@@ -359,7 +359,7 @@ protected function buildBundleFieldDefinitions($entity_type_id, $bundle, array $
// defining the field.
foreach ($module_definitions as $field_name => $definition) {
// @todo Remove this check once FieldDefinitionInterface exposes a
- // proper provider setter. See https://www.drupal.org/node/2225961.
+ // proper provider setter. See https://www.drupal.org/node/2225961.
if ($definition instanceof BaseFieldDefinition) {
$definition->setProvider($module);
}
@@ -513,7 +513,7 @@ protected function buildFieldStorageDefinitions($entity_type_id) {
// defining the field.
foreach ($module_definitions as $field_name => $definition) {
// @todo Remove this check once FieldDefinitionInterface exposes a
- // proper provider setter. See https://www.drupal.org/node/2225961.
+ // proper provider setter. See https://www.drupal.org/node/2225961.
if ($definition instanceof BaseFieldDefinition) {
$definition->setProvider($module);
}
diff --git a/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionSubscriber.php
index 4049f86..0e99946 100644
--- a/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/DefaultExceptionSubscriber.php
@@ -91,7 +91,6 @@ protected function onHtml(GetResponseForExceptionEvent $event) {
if ($this->getErrorLevel() != ERROR_REPORTING_DISPLAY_VERBOSE) {
// Without verbose logging, use a simple message.
-
// We call SafeMarkup::format directly here, rather than use t() since
// we are in the middle of error handling, and we don't want t() to
// cause further errors.
@@ -99,7 +98,6 @@ protected function onHtml(GetResponseForExceptionEvent $event) {
}
else {
// With verbose logging, we will also include a backtrace.
-
$backtrace_exception = $exception;
while ($backtrace_exception->getPrevious()) {
$backtrace_exception = $backtrace_exception->getPrevious();
diff --git a/core/lib/Drupal/Core/EventSubscriber/EntityRouteProviderSubscriber.php b/core/lib/Drupal/Core/EventSubscriber/EntityRouteProviderSubscriber.php
index 36a539d..227f31c 100644
--- a/core/lib/Drupal/Core/EventSubscriber/EntityRouteProviderSubscriber.php
+++ b/core/lib/Drupal/Core/EventSubscriber/EntityRouteProviderSubscriber.php
@@ -43,7 +43,6 @@ public function onDynamicRouteEvent(RouteBuildEvent $event) {
foreach ($this->entityManager->getRouteProviders($entity_type->id()) as $route_provider) {
// Allow to both return an array of routes or a route collection,
// like route_callbacks in the routing.yml file.
-
$routes = $route_provider->getRoutes($entity_type);
if ($routes instanceof RouteCollection) {
$routes = $routes->all();
diff --git a/core/lib/Drupal/Core/Extension/module.api.php b/core/lib/Drupal/Core/Extension/module.api.php
index b732387..b1eb808 100644
--- a/core/lib/Drupal/Core/Extension/module.api.php
+++ b/core/lib/Drupal/Core/Extension/module.api.php
@@ -619,7 +619,6 @@ function hook_install_tasks_alter(&$tasks, $install_state) {
function hook_update_N(&$sandbox) {
// For non-batch updates, the signature can simply be:
// function hook_update_N() {
-
// Example function body for adding a field to a database table, which does
// not require a batch operation:
$spec = array(
@@ -725,7 +724,6 @@ function hook_post_update_NAME(&$sandbox) {
foreach ($blocks as $block) {
// This block has had conditions removed due to an inability to resolve
// contexts in block_update_8001() so disable it.
-
// Disable currently enabled blocks.
if ($block_update_8001[$block->id()]['status']) {
$block->setStatus(FALSE);
diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php
index add9cd7..db7ef13 100644
--- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php
+++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldWidget/OptionsWidgetBase.php
@@ -54,7 +54,6 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
$element['#key_column'] = $this->column;
// The rest of the $element is built by child method implementations.
-
return $element;
}
@@ -75,7 +74,6 @@ public static function validateElement(array $element, FormStateInterface $form_
// Drupal\Core\Field\WidgetBase::submit() expects values as
// an array of values keyed by delta first, then by column, while our
// widgets return the opposite.
-
if (is_array($element['#value'])) {
$values = array_values($element['#value']);
}
diff --git a/core/lib/Drupal/Core/Form/form.api.php b/core/lib/Drupal/Core/Form/form.api.php
index 701871f..2ed057a 100644
--- a/core/lib/Drupal/Core/Form/form.api.php
+++ b/core/lib/Drupal/Core/Form/form.api.php
@@ -246,7 +246,6 @@ function hook_form_FORM_ID_alter(&$form, \Drupal\Core\Form\FormStateInterface $f
// Modification for the form with the given form ID goes here. For example, if
// FORM_ID is "user_register_form" this code would run only on the user
// registration form.
-
// Add a checkbox to registration form about agreeing to terms of use.
$form['terms_of_use'] = array(
'#type' => 'checkbox',
@@ -296,7 +295,6 @@ function hook_form_BASE_FORM_ID_alter(&$form, \Drupal\Core\Form\FormStateInterfa
// Modification for the form with the given BASE_FORM_ID goes here. For
// example, if BASE_FORM_ID is "node_form", this code would run on every
// node form, regardless of node type.
-
// Add a checkbox to the node form about agreeing to terms of use.
$form['terms_of_use'] = array(
'#type' => 'checkbox',
diff --git a/core/lib/Drupal/Core/Language/Language.php b/core/lib/Drupal/Core/Language/Language.php
index abaad81..05024f2 100644
--- a/core/lib/Drupal/Core/Language/Language.php
+++ b/core/lib/Drupal/Core/Language/Language.php
@@ -25,7 +25,6 @@ class Language implements LanguageInterface {
);
// Properties within the Language are set up as the default language.
-
/**
* The human readable English name.
*
diff --git a/core/lib/Drupal/Core/Lock/LockBackendAbstract.php b/core/lib/Drupal/Core/Lock/LockBackendAbstract.php
index 32322d4..0899897 100644
--- a/core/lib/Drupal/Core/Lock/LockBackendAbstract.php
+++ b/core/lib/Drupal/Core/Lock/LockBackendAbstract.php
@@ -36,7 +36,6 @@ public function wait($name, $delay = 30) {
// concerns, begin waiting for 25ms, then add 25ms to the wait period each
// time until it reaches 500ms. After this point polling will continue every
// 500ms until $delay is reached.
-
// $delay is passed in seconds, but we will be using usleep(), which takes
// microseconds as a parameter. Multiply it by 1 million so that all
// further numbers are equivalent.
diff --git a/core/lib/Drupal/Core/Menu/LocalTaskDefault.php b/core/lib/Drupal/Core/Menu/LocalTaskDefault.php
index 38534b1..d00ae7f 100644
--- a/core/lib/Drupal/Core/Menu/LocalTaskDefault.php
+++ b/core/lib/Drupal/Core/Menu/LocalTaskDefault.php
@@ -51,7 +51,6 @@ public function getRouteParameters(RouteMatchInterface $route_match) {
// slugs in the path patterns. For example, if the route's path pattern is
// /filter/tips/{filter_format} and the path is /filter/tips/plain_text then
// $raw_variables->get('filter_format') == 'plain_text'.
-
$raw_variables = $route_match->getRawParameters();
foreach ($variables as $name) {
diff --git a/core/lib/Drupal/Core/Plugin/Context/ContextHandler.php b/core/lib/Drupal/Core/Plugin/Context/ContextHandler.php
index 50d8db6..8787ca5 100644
--- a/core/lib/Drupal/Core/Plugin/Context/ContextHandler.php
+++ b/core/lib/Drupal/Core/Plugin/Context/ContextHandler.php
@@ -70,7 +70,6 @@ public function applyContextMapping(ContextAwarePluginInterface $plugin, $contex
/** @var $contexts \Drupal\Core\Plugin\Context\ContextInterface[] */
$mappings += $plugin->getContextMapping();
// Loop through each of the expected contexts.
-
$missing_value = [];
foreach ($plugin->getContextDefinitions() as $plugin_context_id => $plugin_context_definition) {
diff --git a/core/lib/Drupal/Core/Render/Element/HtmlTag.php b/core/lib/Drupal/Core/Render/Element/HtmlTag.php
index 1d71350..bddaa05 100644
--- a/core/lib/Drupal/Core/Render/Element/HtmlTag.php
+++ b/core/lib/Drupal/Core/Render/Element/HtmlTag.php
@@ -162,7 +162,6 @@ public static function preRenderConditionalComments($element) {
// browsers, use either the "downlevel-hidden" or "downlevel-revealed"
// technique. See http://wikipedia.org/wiki/Conditional_comment
// for details.
-
// Ensure what we are dealing with is safe.
// This would be done later anyway in drupal_render().
$prefix = isset($element['#prefix']) ? $element['#prefix'] : '';
diff --git a/core/lib/Drupal/Core/Render/RenderCache.php b/core/lib/Drupal/Core/Render/RenderCache.php
index 12d52e9..47b8cc9 100644
--- a/core/lib/Drupal/Core/Render/RenderCache.php
+++ b/core/lib/Drupal/Core/Render/RenderCache.php
@@ -62,7 +62,7 @@ public function get(array $elements) {
// Form submissions rely on the form being built during the POST request,
// and render caching of forms prevents this from happening.
// @todo remove the isMethodSafe() check when
- // https://www.drupal.org/node/2367555 lands.
+ // https://www.drupal.org/node/2367555 lands.
if (!$this->requestStack->getCurrentRequest()->isMethodSafe() || !$cid = $this->createCacheID($elements)) {
return FALSE;
}
@@ -89,7 +89,7 @@ public function set(array &$elements, array $pre_bubbling_elements) {
// Form submissions rely on the form being built during the POST request,
// and render caching of forms prevents this from happening.
// @todo remove the isMethodSafe() check when
- // https://www.drupal.org/node/2367555 lands.
+ // https://www.drupal.org/node/2367555 lands.
if (!$this->requestStack->getCurrentRequest()->isMethodSafe() || !$cid = $this->createCacheID($elements)) {
return FALSE;
}
@@ -206,7 +206,6 @@ public function set(array &$elements, array $pre_bubbling_elements) {
// towards that state by progressively merging the 'contexts' value
// across requests. That's the strategy employed below and tested in
// \Drupal\Tests\Core\Render\RendererBubblingTest::testConditionalCacheContextBubblingSelfHealing().
-
// Get the cacheability of this element according to the current (stored)
// redirecting cache item, if any.
$redirect_cacheability = new CacheableMetadata();
diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php
index 09a1bf1..2b1b9c8 100644
--- a/core/lib/Drupal/Core/Render/Renderer.php
+++ b/core/lib/Drupal/Core/Render/Renderer.php
@@ -339,7 +339,7 @@ protected function doRender(&$elements, $is_root_call = FALSE) {
// present (without such a callback, it would be impossible to replace the
// placeholder), replace the current element with a placeholder.
// @todo remove the isMethodSafe() check when
- // https://www.drupal.org/node/2367555 lands.
+ // https://www.drupal.org/node/2367555 lands.
if (isset($elements['#create_placeholder']) && $elements['#create_placeholder'] === TRUE && $this->requestStack->getCurrentRequest()->isMethodSafe()) {
if (!isset($elements['#lazy_builder'])) {
throw new \LogicException('When #create_placeholder is set, a #lazy_builder callback must be present as well.');
diff --git a/core/lib/Drupal/Core/Render/theme.api.php b/core/lib/Drupal/Core/Render/theme.api.php
index d6daa72..d42f7d3 100644
--- a/core/lib/Drupal/Core/Render/theme.api.php
+++ b/core/lib/Drupal/Core/Render/theme.api.php
@@ -558,7 +558,6 @@ function hook_preprocess(&$variables, $hook) {
static $hooks;
// Add contextual links to the variables, if the user has permission.
-
if (!\Drupal::currentUser()->hasPermission('access contextual links')) {
return;
}
diff --git a/core/lib/Drupal/Core/Template/TwigExtension.php b/core/lib/Drupal/Core/Template/TwigExtension.php
index 715fd1e..02be9aa 100644
--- a/core/lib/Drupal/Core/Template/TwigExtension.php
+++ b/core/lib/Drupal/Core/Template/TwigExtension.php
@@ -459,7 +459,6 @@ public function escapeFilter(\Twig_Environment $env, $arg, $strategy = 'html', $
// This is a normal render array, which is safe by definition, with
// special simple cases already handled.
-
// Early return if this element was pre-rendered (no need to re-render).
if (isset($arg['#printed']) && $arg['#printed'] == TRUE && isset($arg['#markup']) && strlen($arg['#markup']) > 0) {
return $arg['#markup'];
diff --git a/core/lib/Drupal/Core/Theme/Registry.php b/core/lib/Drupal/Core/Theme/Registry.php
index d3f0455..d5f27f6 100644
--- a/core/lib/Drupal/Core/Theme/Registry.php
+++ b/core/lib/Drupal/Core/Theme/Registry.php
@@ -439,7 +439,6 @@ protected function processExtension(array &$cache, $name, $type, $theme, $path)
// $result[$hook] will only contain key/value pairs for information being
// overridden. Pull the rest of the information from what was defined by
// an earlier hook.
-
// Fill in the type and path of the module, theme, or engine that
// implements this theme function.
$result[$hook]['type'] = $type;
diff --git a/core/lib/Drupal/Core/Update/UpdateRegistry.php b/core/lib/Drupal/Core/Update/UpdateRegistry.php
index 239d7ac..5100a74 100644
--- a/core/lib/Drupal/Core/Update/UpdateRegistry.php
+++ b/core/lib/Drupal/Core/Update/UpdateRegistry.php
@@ -122,7 +122,6 @@ public function getPendingUpdateFunctions() {
// We need a) the list of active modules (we get that from the config
// bootstrap factory) and b) the path to the modules, we use the extension
// discovery for that.
-
$this->scanExtensionsAndLoadUpdateFiles();
// First figure out which hook_{$this->updateType}_NAME got executed
diff --git a/core/modules/action/tests/src/Unit/Plugin/migrate/source/ActionTest.php b/core/modules/action/tests/src/Unit/Plugin/migrate/source/ActionTest.php
index 3ef553e..74133ab 100644
--- a/core/modules/action/tests/src/Unit/Plugin/migrate/source/ActionTest.php
+++ b/core/modules/action/tests/src/Unit/Plugin/migrate/source/ActionTest.php
@@ -25,7 +25,6 @@ class ActionTest extends MigrateSqlSourceTestCase {
);
// We need to set up the database contents; it's easier to do that below.
-
protected $expectedResults = array(
array(
'aid' => 'Redirect to node list page',
diff --git a/core/modules/block/block.install b/core/modules/block/block.install
index 106815c..03e6500 100644
--- a/core/modules/block/block.install
+++ b/core/modules/block/block.install
@@ -28,12 +28,10 @@ function block_install() {
function block_update_8001() {
// This update function updates blocks for the change from
// https://www.drupal.org/node/2354889.
-
// Core visibility context plugins are updated automatically; blocks with
// unknown plugins are disabled and their previous visibility settings are
// saved in key value storage; see change record
// https://www.drupal.org/node/2527840 for more explanation.
-
// These are all the contexts that Drupal core provides.
$context_service_id_map = [
'node.node' => '@node.node_route_context:node',
diff --git a/core/modules/block/block.module b/core/modules/block/block.module
index 2f96a90..ae744eb 100644
--- a/core/modules/block/block.module
+++ b/core/modules/block/block.module
@@ -176,7 +176,6 @@ function block_theme_suggestions_block(array $variables) {
// contains a hyphen, it will end up as an underscore after this conversion,
// and your function names won't be recognized. So, we need to convert
// hyphens to underscores in block deltas for the theme suggestions.
-
// We can safely explode on : because we know the Block plugin type manager
// enforces that delimiter for all derivatives.
$parts = explode(':', $variables['elements']['#plugin_id']);
diff --git a/core/modules/block/block.post_update.php b/core/modules/block/block.post_update.php
index f208f65..2a27f2f 100644
--- a/core/modules/block/block.post_update.php
+++ b/core/modules/block/block.post_update.php
@@ -41,7 +41,6 @@ function block_post_update_disable_blocks_with_missing_contexts() {
foreach ($blocks as $block) {
// This block has had conditions removed due to an inability to resolve
// contexts in block_update_8001() so disable it.
-
// Disable currently enabled blocks.
if ($block_update_8001[$block->id()]['status']) {
$block->setStatus(FALSE);
diff --git a/core/modules/book/src/BookManager.php b/core/modules/book/src/BookManager.php
index 2942462..dc1f80e 100644
--- a/core/modules/book/src/BookManager.php
+++ b/core/modules/book/src/BookManager.php
@@ -1111,7 +1111,6 @@ public function bookSubtreeData($link) {
// Compute the real cid for book subtree data.
$tree_cid = 'book-links:subtree-data:' . hash('sha256', serialize($data));
// Cache the data, if it is not already in the cache.
-
if (!\Drupal::cache('data')->get($tree_cid)) {
\Drupal::cache('data')->set($tree_cid, $data, Cache::PERMANENT, array('bid:' . $link['bid']));
}
diff --git a/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorPluginManagerTest.php b/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorPluginManagerTest.php
index 92c448b..28e0a8e 100644
--- a/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorPluginManagerTest.php
+++ b/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorPluginManagerTest.php
@@ -31,7 +31,6 @@ protected function setUp() {
parent::setUp();
// Install the Filter module.
-
// Create text format, associate CKEditor.
$filtered_html_format = FilterFormat::create(array(
'format' => 'filtered_html',
diff --git a/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorTest.php b/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorTest.php
index 2bbd1e6..e2277d3 100644
--- a/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorTest.php
+++ b/core/modules/ckeditor/tests/modules/src/Kernel/CKEditorTest.php
@@ -39,7 +39,6 @@ protected function setUp() {
parent::setUp();
// Install the Filter module.
-
// Create text format, associate CKEditor.
$filtered_html_format = FilterFormat::create(array(
'format' => 'filtered_html',
diff --git a/core/modules/color/color.module b/core/modules/color/color.module
index ca0dc3a..7f04672 100644
--- a/core/modules/color/color.module
+++ b/core/modules/color/color.module
@@ -543,7 +543,6 @@ function _color_rewrite_stylesheet($theme, &$info, &$paths, $palette, $style) {
}
else {
// Determine the most suitable base color for the next color.
-
// 'a' declarations. Use link.
if (preg_match('@[^a-z0-9_-](a)[^a-z0-9_-][^/{]*{[^{]+$@i', $chunk)) {
$base = 'link';
@@ -680,7 +679,6 @@ function _color_render_images($theme, &$info, &$paths, $palette) {
function _color_shift($given, $ref1, $ref2, $target) {
// We assume that ref2 is a blend of ref1 and target and find
// delta based on the length of the difference vectors.
-
// delta = 1 - |ref2 - ref1| / |white - ref1|
$target = _color_unpack($target, TRUE);
$ref1 = _color_unpack($ref1, TRUE);
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index 40b4e40..73d872f 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -200,7 +200,6 @@ function comment_node_links_alter(array &$links, NodeInterface $node, array &$co
// can do so by implementing a new field formatter.
// @todo Make this configurable from the formatter. See
// https://www.drupal.org/node/1901110.
-
$comment_links = \Drupal::service('comment.link_builder')->buildCommentedEntityLinks($node, $context);
$links += $comment_links;
}
diff --git a/core/modules/comment/src/CommentStorage.php b/core/modules/comment/src/CommentStorage.php
index cc4fdcf..3abedd5 100644
--- a/core/modules/comment/src/CommentStorage.php
+++ b/core/modules/comment/src/CommentStorage.php
@@ -144,7 +144,6 @@ public function getNewCommentPageNumber($total_comments, $new_comments, Fieldabl
}
else {
// Threaded comments.
-
// 1. Find all the threads with a new comment.
$unread_threads_query = $this->database->select('comment_field_data', 'comment')
->fields('comment', array('thread'))
diff --git a/core/modules/comment/src/Entity/Comment.php b/core/modules/comment/src/Entity/Comment.php
index d626be3..8a2b9e0 100644
--- a/core/modules/comment/src/Entity/Comment.php
+++ b/core/modules/comment/src/Entity/Comment.php
@@ -100,7 +100,6 @@ public function preSave(EntityStorageInterface $storage) {
else {
// This is a comment with a parent comment, so increase the part of
// the thread value at the proper depth.
-
// Get the parent comment:
$parent = $this->getParentComment();
// Strip the "/" from the end of the parent thread.
diff --git a/core/modules/comment/src/Tests/CommentPagerTest.php b/core/modules/comment/src/Tests/CommentPagerTest.php
index 760e25f..7610ac1 100644
--- a/core/modules/comment/src/Tests/CommentPagerTest.php
+++ b/core/modules/comment/src/Tests/CommentPagerTest.php
@@ -135,7 +135,6 @@ function testCommentOrderingThreading() {
// - 6
// - 2
// - 5
-
$this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_FLAT, 'Comment paging changed.');
$expected_order = array(
@@ -230,7 +229,6 @@ function testCommentNewPageIndicator() {
// - 3
// - 2
// - 5
-
$this->setCommentSettings('default_mode', CommentManagerInterface::COMMENT_MODE_FLAT, 'Comment paging changed.');
$expected_pages = array(
diff --git a/core/modules/comment/src/Tests/CommentThreadingTest.php b/core/modules/comment/src/Tests/CommentThreadingTest.php
index c8ea93e..ba1cb3f 100644
--- a/core/modules/comment/src/Tests/CommentThreadingTest.php
+++ b/core/modules/comment/src/Tests/CommentThreadingTest.php
@@ -158,7 +158,6 @@ protected function assertNoParentLink($cid) {
//
foobar
'")); $this->assertText(Html::escape("foo: 'foobar
'")); diff --git a/core/modules/config_translation/src/Tests/ConfigTranslationListUiTest.php b/core/modules/config_translation/src/Tests/ConfigTranslationListUiTest.php index 8bd3d71..08345c6 100644 --- a/core/modules/config_translation/src/Tests/ConfigTranslationListUiTest.php +++ b/core/modules/config_translation/src/Tests/ConfigTranslationListUiTest.php @@ -490,7 +490,6 @@ public function testTranslateOperationInListUi() { $this->doFieldListTest(); // Views is tested in Drupal\config_translation\Tests\ConfigTranslationViewListUiTest - // Test the maintenance settings page. $this->doSettingsPageTest('admin/config/development/maintenance'); // Test the site information settings page. diff --git a/core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeWidgetBase.php b/core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeWidgetBase.php index df23426..2b1096e 100644 --- a/core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeWidgetBase.php +++ b/core/modules/datetime/src/Plugin/Field/FieldWidget/DateTimeWidgetBase.php @@ -22,7 +22,6 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen // identifying this item in error messages. We do not want to display this // title because the actual title display is handled at a higher level by // the Field module. - $element['#theme_wrappers'][] = 'datetime_wrapper'; $element['#attributes']['class'][] = 'container-inline'; diff --git a/core/modules/datetime/src/Plugin/views/filter/Date.php b/core/modules/datetime/src/Plugin/views/filter/Date.php index 9fd47fd..bc5f573 100644 --- a/core/modules/datetime/src/Plugin/views/filter/Date.php +++ b/core/modules/datetime/src/Plugin/views/filter/Date.php @@ -95,8 +95,6 @@ protected function opBetween($field) { $b = intval(strtotime($this->value['max'], $origin)); // Formatting will vary on date storage. - - // Convert to ISO format and format for query. UTC timezone is used since // dates are stored in UTC. $a = $this->query->getDateFormat("'" . $this->dateFormatter->format($a, 'custom', DATETIME_DATETIME_STORAGE_FORMAT, DATETIME_STORAGE_TIMEZONE) . "'", $this->dateFormat, TRUE); diff --git a/core/modules/editor/tests/src/Kernel/EditorManagerTest.php b/core/modules/editor/tests/src/Kernel/EditorManagerTest.php index b6077a5..449bac5 100644 --- a/core/modules/editor/tests/src/Kernel/EditorManagerTest.php +++ b/core/modules/editor/tests/src/Kernel/EditorManagerTest.php @@ -31,7 +31,6 @@ protected function setUp() { parent::setUp(); // Install the Filter module. - // Add text formats. $filtered_html_format = FilterFormat::create(array( 'format' => 'filtered_html', diff --git a/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php b/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php index d62cb68..4832d52 100644 --- a/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php +++ b/core/modules/editor/tests/src/Kernel/QuickEditIntegrationTest.php @@ -67,7 +67,6 @@ protected function setUp() { parent::setUp(); // Install the Filter module. - // Create a field. $this->fieldName = 'field_textarea'; $this->createFieldWithStorage( diff --git a/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php b/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php index d19758e..8c05d1f 100644 --- a/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php +++ b/core/modules/editor/tests/src/Unit/EditorXssFilter/StandardTest.php @@ -56,7 +56,6 @@ public function providerTestFilterXss() { $data[] = array('Hello, world!
Hello, world!