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) { //
//

//
- $pattern = "//a[@id='comment-$cid']/following-sibling::article//p[contains(@class, 'parent')]"; $this->assertNoFieldByXpath($pattern, NULL, format_string( 'Comment %cid does not have a link to a parent.', diff --git a/core/modules/comment/src/Tests/Views/WizardTest.php b/core/modules/comment/src/Tests/Views/WizardTest.php index 885ce2c..efb7b29 100644 --- a/core/modules/comment/src/Tests/Views/WizardTest.php +++ b/core/modules/comment/src/Tests/Views/WizardTest.php @@ -52,7 +52,6 @@ public function testCommentWizard() { // If we update the type first we should get a selection of comment valid // row plugins as the select field. - $this->drupalGet('admin/structure/views/add'); $this->drupalPostForm('admin/structure/views/add', $view, t('Update "of type" choice')); diff --git a/core/modules/comment/tests/src/Unit/Migrate/d6/CommentTestBase.php b/core/modules/comment/tests/src/Unit/Migrate/d6/CommentTestBase.php index 79bae3e..70dd5a7 100644 --- a/core/modules/comment/tests/src/Unit/Migrate/d6/CommentTestBase.php +++ b/core/modules/comment/tests/src/Unit/Migrate/d6/CommentTestBase.php @@ -25,7 +25,6 @@ ); // We need to set up the database contents; it's easier to do that below. - protected $expectedResults = array( array( 'cid' => 1, diff --git a/core/modules/config/src/Tests/ConfigEntityTest.php b/core/modules/config/src/Tests/ConfigEntityTest.php index a8a8f0f..b60de1b 100644 --- a/core/modules/config/src/Tests/ConfigEntityTest.php +++ b/core/modules/config/src/Tests/ConfigEntityTest.php @@ -139,7 +139,6 @@ function testCRUD() { // Verify that a configuration entity can be saved with an ID of the // maximum allowed length, but not longer. - // Test with a short ID. $id_length_config_test = entity_create('config_test', array( 'id' => $this->randomMachineName(8), diff --git a/core/modules/config/src/Tests/ConfigImportAllTest.php b/core/modules/config/src/Tests/ConfigImportAllTest.php index baeacb9..2a9eb01 100644 --- a/core/modules/config/src/Tests/ConfigImportAllTest.php +++ b/core/modules/config/src/Tests/ConfigImportAllTest.php @@ -74,7 +74,6 @@ public function testInstallUninstall() { // Delete every field on the site so all modules can be uninstalled. For // example, if a comment field exists then module becomes required and can // not be uninstalled. - $field_storages = \Drupal::entityManager()->getStorage('field_storage_config')->loadMultiple(); \Drupal::entityManager()->getStorage('field_storage_config')->delete($field_storages); // Purge the data. diff --git a/core/modules/config/src/Tests/ConfigImportUITest.php b/core/modules/config/src/Tests/ConfigImportUITest.php index afa9b99..3c3b796 100644 --- a/core/modules/config/src/Tests/ConfigImportUITest.php +++ b/core/modules/config/src/Tests/ConfigImportUITest.php @@ -295,7 +295,6 @@ function testImportDiff() { // The following assertions do not use $this::assertEscaped() because // \Drupal\Component\Diff\DiffFormatter adds markup that signifies what has // changed. - // Changed values are escaped. $this->assertText(Html::escape("foo: '

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!

Pink Fairy Armadillotest', '

Hello, world!

Pink Fairy Armadillotest'); // All cases listed on https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet - // No Filter Evasion. // @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#No_Filter_Evasion $data[] = array('', ''); @@ -178,7 +177,6 @@ public function providerTestFilterXss() { // @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#Escaping_JavaScript_escapes // This one is irrelevant for Drupal; we *never* output any JavaScript code // that depends on the URL's query string. - // End title tag. // @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#End_title_tag $data[] = array('', 'alert("XSS");'); @@ -390,7 +388,6 @@ public function providerTestFilterXss() { // US-ASCII encoding. // @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#US-ASCII_encoding // This one is irrelevant for Drupal; Drupal *always* outputs UTF-8. - // META. // @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#META $data[] = array('', ''); @@ -469,7 +466,6 @@ public function providerTestFilterXss() { // @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#Locally_hosted_XML_with_embedded_JavaScript_that_is_generated_using_an_XML_data_island // This one is irrelevant for Drupal; Drupal disallows XML uploads by // default. - // HTML+TIME in XML. // @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#HTML.2BTIME_in_XML $data[] = array('">', '<?xml:namespace prefix="t" ns="urn:schemas-microsoft-com:time"><?import namespace="t" implementation="#default#time2">alert("XSS")">'); @@ -482,7 +478,6 @@ public function providerTestFilterXss() { // @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#IMG_Embedded_commands // This one is irrelevant for Drupal; this is actually a CSRF, for which // Drupal has CSRF protection. See https://www.drupal.org/node/178896. - // Cookie manipulation. // @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#Cookie_manipulation $data[] = array('', 'alert(\'XSS\')">'); @@ -490,7 +485,6 @@ public function providerTestFilterXss() { // UTF-7 encoding. // @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#UTF-7_encoding // This one is irrelevant for Drupal; Drupal *always* outputs UTF-8. - // XSS using HTML quote encapsulation. // @see https://www.owasp.org/index.php/XSS_Filter_Evasion_Cheat_Sheet#XSS_using_HTML_quote_encapsulation $data[] = array('', '" SRC="http://ha.ckers.org/xss.js">'); @@ -506,7 +500,6 @@ public function providerTestFilterXss() { // This one is irrelevant for Drupal; Drupal doesn't forbid linking to some // sites, it only forbids linking to any protocols other than those that are // whitelisted. - // Test XSS filtering on data-attributes. // @see \Drupal\editor\EditorXssFilter::filterXssDataAttributes() diff --git a/core/modules/field/field.module b/core/modules/field/field.module index 053ab4a..aa48490 100644 --- a/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -229,7 +229,6 @@ function field_entity_bundle_delete($entity_type_id, $bundle) { // \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::onDependencyRemoval() // because we need to take into account bundles that are not provided by a // config entity type so they are not part of the config dependencies. - // Gather a list of all entity reference fields. $map = \Drupal::entityManager()->getFieldMapByFieldType('entity_reference'); $ids = []; diff --git a/core/modules/field/src/Tests/EntityReference/EntityReferenceAutoCreateTest.php b/core/modules/field/src/Tests/EntityReference/EntityReferenceAutoCreateTest.php index 0f35fde..3bbe593 100644 --- a/core/modules/field/src/Tests/EntityReference/EntityReferenceAutoCreateTest.php +++ b/core/modules/field/src/Tests/EntityReference/EntityReferenceAutoCreateTest.php @@ -210,7 +210,6 @@ public function testMultipleTargetBundles() { // @todo Re-enable this test when WebTestBase::curlHeaderCallback() provides // a way to catch and assert user-triggered errors. - // Test the case when the field config settings are inconsistent. //unset($handler_settings['auto_create_bundle']); //$field_config->setSetting('handler_settings', $handler_settings); diff --git a/core/modules/field/src/Tests/FormTest.php b/core/modules/field/src/Tests/FormTest.php index a6014a7..aadee45 100644 --- a/core/modules/field/src/Tests/FormTest.php +++ b/core/modules/field/src/Tests/FormTest.php @@ -121,7 +121,6 @@ function testFieldFormSingle() { $this->drupalPostForm(NULL, $edit, t('Save')); $this->assertRaw(t('%name does not accept the value -1.', array('%name' => $this->field['label'])), 'Field validation fails with invalid input.'); // TODO : check that the correct field is flagged for error. - // Create an entity $value = mt_rand(1, 127); $edit = array( @@ -256,7 +255,6 @@ function testFieldFormUnlimited() { $this->assertFieldByName("{$field_name}[1][value]", '', 'New widget is displayed'); $this->assertNoField("{$field_name}[2][value]", 'No extraneous widget is displayed'); // TODO : check that non-field inputs are preserved ('title'), etc. - // Yet another time so that we can play with more values -> 3 widgets. $this->drupalPostForm(NULL, array(), t('Add another item')); @@ -310,7 +308,6 @@ function testFieldFormUnlimited() { // value in the middle. // Submit: check that the entity is updated with correct values // Re-submit: check that the field can be emptied. - // Test with several multiple fields in a form } @@ -595,7 +592,6 @@ function testHiddenField() { $this->field->save(); // We explicitly do not assign a widget in a form display, so the field // stays hidden in forms. - // Display the entity creation form. $this->drupalGet($entity_type . '/add'); diff --git a/core/modules/field/src/Tests/String/StringFieldTest.php b/core/modules/field/src/Tests/String/StringFieldTest.php index 0ac5748..bb94cb9 100644 --- a/core/modules/field/src/Tests/String/StringFieldTest.php +++ b/core/modules/field/src/Tests/String/StringFieldTest.php @@ -37,7 +37,6 @@ protected function setUp() { } // Test fields. - /** * Test widgets. */ diff --git a/core/modules/field/tests/src/Kernel/FieldCrudTest.php b/core/modules/field/tests/src/Kernel/FieldCrudTest.php index a61d645..51ac2e0 100644 --- a/core/modules/field/tests/src/Kernel/FieldCrudTest.php +++ b/core/modules/field/tests/src/Kernel/FieldCrudTest.php @@ -59,7 +59,6 @@ function setUp() { // - a minimal $field structure, check all default values are set // defer actual $field comparison to a helper function, used for the two cases above, // and for testUpdateField - /** * Test the creation of a field. */ @@ -213,7 +212,6 @@ function testDeleteField() { // TODO: Test deletion of the data stored in the field also. // Need to check that data for a 'deleted' field / storage doesn't get loaded // Need to check data marked deleted is cleaned on cron (not implemented yet...) - // Create two fields for the same field storage so we can test that only one // is deleted. FieldConfig::create($this->fieldDefinition)->save(); diff --git a/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php b/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php index b536fe8..eed74a8 100644 --- a/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php +++ b/core/modules/field/tests/src/Kernel/FieldImportDeleteTest.php @@ -36,7 +36,6 @@ public function testImportDelete() { // - field.field.entity_test.entity_test.field_test_import // - field.field.entity_test.entity_test.field_test_import_2 // - field.field.entity_test.test_bundle.field_test_import_2 - $field_name = 'field_test_import'; $field_storage_id = "entity_test.$field_name"; $field_name_2 = 'field_test_import_2'; diff --git a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php index da1948c..415d7d7 100644 --- a/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php +++ b/core/modules/field/tests/src/Kernel/FieldStorageCrudTest.php @@ -27,7 +27,6 @@ class FieldStorageCrudTest extends FieldKernelTestBase { // - a full fledged $field structure, check that all the values are there // - a minimal $field structure, check all default values are set // defer actual $field comparison to a helper function, used for the two cases above - /** * Test the creation of a field storage. */ @@ -286,7 +285,6 @@ function testIndexes() { */ function testDelete() { // TODO: Also test deletion of the data stored in the field ? - // Create two fields (so we can test that only one is deleted). $field_storage_definition = array( 'field_name' => 'field_1', diff --git a/core/modules/file/file.module b/core/modules/file/file.module index d69c149..8b0ddea 100644 --- a/core/modules/file/file.module +++ b/core/modules/file/file.module @@ -861,7 +861,7 @@ function file_save_upload($form_field_name, $validators = array(), $destination ), ); // @todo Add support for render arrays in drupal_set_message()? See - // https://www.drupal.org/node/2505497. + // https://www.drupal.org/node/2505497. drupal_set_message(\Drupal::service('renderer')->renderPlain($message), 'error'); $files[$i] = FALSE; continue; diff --git a/core/modules/file/src/FileViewsData.php b/core/modules/file/src/FileViewsData.php index cf24062..d35f7ee 100644 --- a/core/modules/file/src/FileViewsData.php +++ b/core/modules/file/src/FileViewsData.php @@ -111,7 +111,6 @@ public function getViewsData() { // relationships are type-restricted in the joins declared above, and // file->entity relationships are type-restricted in the relationship // declarations below. - // Describes relationships between files and nodes. $data['file_usage']['file_to_node'] = array( 'title' => $this->t('Content'), diff --git a/core/modules/file/src/Tests/DownloadTest.php b/core/modules/file/src/Tests/DownloadTest.php index e92cef3..ef2ac9f 100644 --- a/core/modules/file/src/Tests/DownloadTest.php +++ b/core/modules/file/src/Tests/DownloadTest.php @@ -49,7 +49,6 @@ public function testPrivateFileTransferWithoutPageCache() { */ protected function doPrivateFileTransferTest() { // Set file downloads to private so handler functions get called. - // Create a file. $contents = $this->randomMachineName(8); $file = $this->createFile(NULL, $contents, 'private'); diff --git a/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php b/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php index b4ce50c..0a3cebb 100644 --- a/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php +++ b/core/modules/filter/tests/src/Kernel/FilterDefaultConfigTest.php @@ -20,7 +20,6 @@ protected function setUp() { // Drupal\filter\FilterPermissions::permissions() builds a URL to output // a link in the description. - $this->installEntitySchema('user'); // Install filter_test module, which ships with custom default format. diff --git a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php index 06c1e4b..f575b5a 100644 --- a/core/modules/filter/tests/src/Kernel/FilterKernelTest.php +++ b/core/modules/filter/tests/src/Kernel/FilterKernelTest.php @@ -555,7 +555,6 @@ function testUrlFilter() { // @todo Possible categories: // - absolute, mail, partial // - characters/encoding, surrounding markup, security - // Create a email that is too long. $long_email = str_repeat('a', 254) . '@example.com'; $too_long_email = str_repeat('b', 255) . '@example.com'; diff --git a/core/modules/history/history.views.inc b/core/modules/history/history.views.inc index 4b98136..9d6bea8 100644 --- a/core/modules/history/history.views.inc +++ b/core/modules/history/history.views.inc @@ -10,7 +10,6 @@ */ function history_views_data() { // History table - // We're actually defining a specific instance of the table, so let's // alias it so that we can later add the real table for other purposes if we // need it. diff --git a/core/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php b/core/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php index 80d78bd..c415f7d 100644 --- a/core/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php +++ b/core/modules/history/src/Plugin/views/filter/HistoryUserTimestamp.php @@ -70,7 +70,6 @@ public function query() { // Hey, Drupal kills old history, so nodes that haven't been updated // since HISTORY_READ_LIMIT are bzzzzzzzt outta here! - $limit = REQUEST_TIME - HISTORY_READ_LIMIT; $this->ensureMyTable(); diff --git a/core/modules/image/src/Tests/ImageAdminStylesTest.php b/core/modules/image/src/Tests/ImageAdminStylesTest.php index 4b7ff43..6cc8838 100644 --- a/core/modules/image/src/Tests/ImageAdminStylesTest.php +++ b/core/modules/image/src/Tests/ImageAdminStylesTest.php @@ -97,7 +97,6 @@ function testStyle() { ); // Add style form. - $edit = array( 'name' => $style_name, 'label' => $style_label, @@ -112,7 +111,6 @@ function testStyle() { $this->assertLinkByHref($style_path . '/delete'); // Add effect form. - // Add each sample effect to the style. foreach ($effect_edits as $effect => $edit) { $edit_data = array(); @@ -161,7 +159,6 @@ function testStyle() { } // Image style overview form (ordering and renaming). - // Confirm the order of effects is maintained according to the order we // added the fields. $effect_edits_order = array_keys($effect_edits); @@ -224,7 +221,6 @@ function testStyle() { $this->assertTrue($order_correct, 'The order of the effects is correctly set by default.'); // Image effect deletion form. - // Create an image to make sure it gets flushed after deleting an effect. $image_path = $this->createSampleImage($style); $this->assertEqual($this->getImageCount($style), 1, format_string('Image style %style image %file successfully generated.', array('%style' => $style->label(), '%file' => $image_path))); @@ -261,7 +257,6 @@ function testStyle() { $this->assertEqual(count($style->getEffects()), 6, 'Rotate effect with transparent background was added.'); // Style deletion form. - // Delete the style. $this->drupalPostForm($style_path . '/delete', array(), t('Delete')); @@ -272,7 +267,6 @@ function testStyle() { $this->assertFalse(ImageStyle::load($style_name), format_string('Image style %style successfully deleted.', array('%style' => $style->label()))); // Test empty text when there are no image styles. - // Delete all image styles. foreach (ImageStyle::loadMultiple() as $image_style) { $image_style->delete(); diff --git a/core/modules/image/src/Tests/ImageFieldDisplayTest.php b/core/modules/image/src/Tests/ImageFieldDisplayTest.php index 666a791..f09b7db 100644 --- a/core/modules/image/src/Tests/ImageFieldDisplayTest.php +++ b/core/modules/image/src/Tests/ImageFieldDisplayTest.php @@ -239,7 +239,6 @@ function testImageFieldSettings() { // We have to create the article first and then edit it because the alt // and title fields do not display until the image has been attached. - // Create alt text for the image. $alt = $this->randomMachineName(); @@ -372,7 +371,6 @@ function testImageFieldDefaultImage() { // Create a node with an image attached and ensure that the default image // is not displayed. - // Create alt text for the image. $alt = $this->randomMachineName(); diff --git a/core/modules/language/src/LanguageNegotiator.php b/core/modules/language/src/LanguageNegotiator.php index 3257567..8e4aad7 100644 --- a/core/modules/language/src/LanguageNegotiator.php +++ b/core/modules/language/src/LanguageNegotiator.php @@ -326,13 +326,11 @@ function updateConfiguration(array $types) { // settings are always considered non-configurable. In turn if default // settings are missing, the language type is always considered // configurable. - // If the language type is locked we can just store its default language // negotiation settings if it has some, since it is not configurable. if ($has_default_settings) { $method_weights = array(); // Default settings are in $info['fixed']. - foreach ($info['fixed'] as $weight => $method_id) { if (isset($method_definitions[$method_id])) { $method_weights[$method_id] = $weight; diff --git a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationContentEntity.php b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationContentEntity.php index 78edb89..1bef80c 100644 --- a/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationContentEntity.php +++ b/core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationContentEntity.php @@ -104,7 +104,6 @@ public function processOutbound($path, &$options = [], Request $request = NULL, // If appropriate, process outbound to add a query parameter to the url and // remove the language option, so that url negotiator does not rewrite the // url. - // First, check if processing conditions are met. if (!($request && !empty($options['route']) && $this->hasLowerLanguageNegotiationWeight() && $this->meetsContentEntityRoutesCondition($options['route'], $request))) { return $path; diff --git a/core/modules/language/src/Tests/LanguageConfigurationTest.php b/core/modules/language/src/Tests/LanguageConfigurationTest.php index cf049f1..ce45794 100644 --- a/core/modules/language/src/Tests/LanguageConfigurationTest.php +++ b/core/modules/language/src/Tests/LanguageConfigurationTest.php @@ -103,7 +103,7 @@ function testLanguageConfiguration() { $this->drupalPostForm(NULL, $edit, t('Save configuration')); $this->assertText(t('The prefix may only be left blank for the selected detection fallback language.')); - // Check that prefix cannot be changed to contain a slash. + // Check that prefix cannot be changed to contain a slash. $edit = array( 'prefix[en]' => 'foo/bar', ); diff --git a/core/modules/language/src/Tests/LanguageListTest.php b/core/modules/language/src/Tests/LanguageListTest.php index d407530..44fa56e 100644 --- a/core/modules/language/src/Tests/LanguageListTest.php +++ b/core/modules/language/src/Tests/LanguageListTest.php @@ -136,7 +136,6 @@ function testLanguageList() { $this->drupalGet('admin/config/regional/language/delete/fr'); $this->assertResponse(404, 'Language no longer found.'); // Make sure the "language_count" state has not changed. - // Ensure we can delete the English language. Right now English is the only // language so we must add a new language and make it the default before // deleting English. diff --git a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php index fd670fd..8e8da91 100644 --- a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php +++ b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php @@ -106,7 +106,7 @@ protected static function getUserEnteredStringAsUri($string) { $entity_id = EntityAutocomplete::extractEntityIdFromAutocompleteInput($string); if ($entity_id !== NULL) { // @todo Support entity types other than 'node'. Will be fixed in - // https://www.drupal.org/node/2423093. + // https://www.drupal.org/node/2423093. $uri = 'entity:node/' . $entity_id; } // Detect a schemeless string, map to 'internal:' URI. @@ -182,7 +182,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen if ($this->supportsInternalLinks()) { $element['uri']['#type'] = 'entity_autocomplete'; // @todo The user should be able to select an entity type. Will be fixed - // in https://www.drupal.org/node/2423093. + // in https://www.drupal.org/node/2423093. $element['uri']['#target_type'] = 'node'; // Disable autocompletion when the first character is '/', '#' or '?'. $element['uri']['#attributes']['data-autocomplete-first-character-blacklist'] = '/#?'; diff --git a/core/modules/locale/locale.module b/core/modules/locale/locale.module index aecad6c..c08ce80 100644 --- a/core/modules/locale/locale.module +++ b/core/modules/locale/locale.module @@ -920,7 +920,6 @@ function locale_translation_status_save($project, $langcode, $type, $data) { // Follow-up issue: https://www.drupal.org/node/1842362. // Split status storage per module/language and expire individually. This will // improve performance for large sites. - // Load the translation status or build it if not already available. module_load_include('translation.inc', 'locale'); $status = locale_translation_get_status(); @@ -1366,7 +1365,6 @@ function _locale_rebuild_js($langcode = NULL) { $logger->warning('JavaScript translation file %file.js was lost.', array('%file' => $locale_javascripts[$language->getId()])); // Proceed to the 'created' case as the JavaScript translation file has // been created again. - case 'created': $logger->notice('Created JavaScript translation file for the language %language.', array('%language' => $language->getName())); return TRUE; diff --git a/core/modules/locale/locale.translation.inc b/core/modules/locale/locale.translation.inc index 0383aaf..29fb0e9 100644 --- a/core/modules/locale/locale.translation.inc +++ b/core/modules/locale/locale.translation.inc @@ -229,7 +229,6 @@ function locale_translation_source_build($project, $langcode, $filename = NULL) // Follow-up issue: https://www.drupal.org/node/1842380. // Convert $source object to a TranslatableProject class and use a typed class // for $source-file. - // Create a source object with data of the project object. $source = clone $project; $source->project = $project->name; diff --git a/core/modules/locale/src/Tests/LocaleTranslationUiTest.php b/core/modules/locale/src/Tests/LocaleTranslationUiTest.php index aad0119..ef4a41c 100644 --- a/core/modules/locale/src/Tests/LocaleTranslationUiTest.php +++ b/core/modules/locale/src/Tests/LocaleTranslationUiTest.php @@ -229,7 +229,6 @@ public function testJavaScriptTranslation() { $this->container->get('language_manager')->reset(); // Build the JavaScript translation file. - // Retrieve the source string of the first string available in the // {locales_source} table and translate it. $query = db_select('locales_source', 's'); @@ -307,7 +306,6 @@ public function testStringValidation() { ); $this->drupalPostForm('admin/config/regional/translate', $search, t('Filter')); // Find the edit path. - $textarea = current($this->xpath('//textarea')); $lid = (string) $textarea[0]['name']; foreach ($bad_translations as $translation) { diff --git a/core/modules/menu_link_content/src/Tests/LinksTest.php b/core/modules/menu_link_content/src/Tests/LinksTest.php index 5fd0ca1..3548796 100644 --- a/core/modules/menu_link_content/src/Tests/LinksTest.php +++ b/core/modules/menu_link_content/src/Tests/LinksTest.php @@ -53,8 +53,8 @@ function createLinkHierarchy($module = 'menu_test') { // Then create a simple link hierarchy: // - parent // - child-1 - // - child-1-1 - // - child-1-2 + // - child-1-1 + // - child-1-2 // - child-2 $base_options = array( 'title' => 'Menu link test', diff --git a/core/modules/menu_ui/src/Tests/MenuTest.php b/core/modules/menu_ui/src/Tests/MenuTest.php index 016cca7..23f4557 100644 --- a/core/modules/menu_ui/src/Tests/MenuTest.php +++ b/core/modules/menu_ui/src/Tests/MenuTest.php @@ -309,7 +309,6 @@ function doMenuTests() { // - item1 // -- item2 // --- item3 - $this->assertMenuLink($item1->getPluginId(), array( 'children' => array($item2->getPluginId(), $item3->getPluginId()), 'parents' => array($item1->getPluginId()), @@ -349,7 +348,6 @@ function doMenuTests() { // - item4 // -- item5 // -- item6 - $this->assertMenuLink($item4->getPluginId(), array( 'children' => array($item5->getPluginId(), $item6->getPluginId()), 'parents' => array($item4->getPluginId()), @@ -389,7 +387,6 @@ function doMenuTests() { // --- item2 // ---- item3 // -- item6 - $this->assertMenuLink($item1->getPluginId(), array( 'children' => array(), 'parents' => array($item1->getPluginId()), diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php index ae36aa0..02097c4 100644 --- a/core/modules/node/node.api.php +++ b/core/modules/node/node.api.php @@ -272,7 +272,6 @@ function hook_node_grants_alter(&$grants, \Drupal\Core\Session\AccountInterface // content. Since some other node access modules might allow this // permission, we expressly remove it by returning an empty $grants // array for roles specified in our variable setting. - // Get our list of banned roles. $restricted = \Drupal::config('example.settings')->get('restricted_roles'); diff --git a/core/modules/node/node.tokens.inc b/core/modules/node/node.tokens.inc index 81fa3f0..c9cb445 100644 --- a/core/modules/node/node.tokens.inc +++ b/core/modules/node/node.tokens.inc @@ -140,7 +140,6 @@ function node_tokens($type, $tokens, array $data, array $options, BubbleableMeta // A summary was requested. if ($name == 'summary') { // Generate an optionally trimmed summary of the body field. - // Get the 'trim_length' size used for the 'teaser' mode, if // present, or use the default trim_length size. $display_options = entity_get_display('node', $node->getType(), 'teaser')->getComponent('body'); diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php index 82faab7..d6c54ba 100644 --- a/core/modules/node/src/NodeForm.php +++ b/core/modules/node/src/NodeForm.php @@ -248,7 +248,6 @@ protected function actions(array $form, FormStateInterface $form_state) { // 1 | 0 » unpublish & Save and publish & Save as unpublished // 0 | 1 » publish & Save and keep published & Save and unpublish // 0 | 0 » unpublish & Save and keep unpublished & Save and publish - // Add a "Publish" button. $element['publish'] = $element['submit']; // If the "Publish" button is clicked, we want to update the status to "published". diff --git a/core/modules/node/src/NodeViewsData.php b/core/modules/node/src/NodeViewsData.php index 21e1e44..35dcde6 100644 --- a/core/modules/node/src/NodeViewsData.php +++ b/core/modules/node/src/NodeViewsData.php @@ -75,7 +75,6 @@ public function getViewsData() { ); // Bogus fields for aliasing purposes. - // @todo Add similar support to any date field // @see https://www.drupal.org/node/2337507 $data['node_field_data']['created_fulldate'] = array( diff --git a/core/modules/node/src/Plugin/Search/NodeSearch.php b/core/modules/node/src/Plugin/Search/NodeSearch.php index d161a0a..2cc5df1 100644 --- a/core/modules/node/src/Plugin/Search/NodeSearch.php +++ b/core/modules/node/src/Plugin/Search/NodeSearch.php @@ -719,7 +719,6 @@ protected function parseAdvancedDefaults($f, $keys) { } // Split out the negative, phrase, and OR parts of keywords. - // For phrases, the form only supports one phrase. $matches = array(); $keys = ' ' . $keys . ' '; diff --git a/core/modules/node/src/Plugin/views/row/Rss.php b/core/modules/node/src/Plugin/views/row/Rss.php index 097655a..84afe29 100644 --- a/core/modules/node/src/Plugin/views/row/Rss.php +++ b/core/modules/node/src/Plugin/views/row/Rss.php @@ -123,7 +123,6 @@ public function render($row) { // The node gets built and modules add to or modify $node->rss_elements // and $node->rss_namespaces. - $build_mode = $display_mode; $build = node_view($node, $build_mode); diff --git a/core/modules/node/src/Plugin/views/wizard/Node.php b/core/modules/node/src/Plugin/views/wizard/Node.php index 833b092..ca6682a 100644 --- a/core/modules/node/src/Plugin/views/wizard/Node.php +++ b/core/modules/node/src/Plugin/views/wizard/Node.php @@ -199,7 +199,6 @@ protected function buildFilters(&$form, FormStateInterface $form_state) { } // Add the "tagged with" filter to the view. - // We construct this filter using taxonomy_index.tid (which limits the // filtering to a specific vocabulary) rather than // taxonomy_term_field_data.name (which matches terms in any vocabulary). @@ -207,12 +206,10 @@ protected function buildFilters(&$form, FormStateInterface $form_state) { // the autocomplete UI, and also to avoid confusion with other vocabularies // on the site that may have terms with the same name but are not used for // free tagging. - // The downside is that if there *is* more than one vocabulary on the site // that is used for free tagging, the wizard will only be able to make the // "tagged with" filter apply to one of them (see below for the method it // uses to choose). - // Find all "tag-like" taxonomy fields associated with the view's // entities. If a particular entity type (i.e., bundle) has been // selected above, then we only search for taxonomy fields associated diff --git a/core/modules/node/src/Tests/NodeAccessLanguageAwareCombinationTest.php b/core/modules/node/src/Tests/NodeAccessLanguageAwareCombinationTest.php index acf9217..fd3f305 100644 --- a/core/modules/node/src/Tests/NodeAccessLanguageAwareCombinationTest.php +++ b/core/modules/node/src/Tests/NodeAccessLanguageAwareCombinationTest.php @@ -93,7 +93,6 @@ protected function setUp() { // implemented by one or both modules to enforce that private nodes or // translations are always private, but we want to test the default, // additive behavior of node access). - // Create six Hungarian nodes with Catalan translations: // 1. One public with neither language marked as private. // 2. One private with neither language marked as private. @@ -251,7 +250,6 @@ function testNodeAccessLanguageAwareCombination() { $this->assertNodeAccess($expected_node_access_no_access, $this->nodes['private_no_language_public'], $this->webUser); // Query the node table with the node access tag in several languages. - // Query with no language specified. The fallback (hu or und) will be used. $select = db_select('node', 'n') ->fields('n', array('nid')) diff --git a/core/modules/node/src/Tests/NodeAccessLanguageAwareTest.php b/core/modules/node/src/Tests/NodeAccessLanguageAwareTest.php index ea5a883..9b24daf 100644 --- a/core/modules/node/src/Tests/NodeAccessLanguageAwareTest.php +++ b/core/modules/node/src/Tests/NodeAccessLanguageAwareTest.php @@ -85,7 +85,6 @@ protected function setUp() { // The node_access_test_language module allows individual translations of a // node to be marked private (not viewable by normal users). - // Create six nodes: // 1. Four Hungarian nodes with Catalan translations // - One with neither language marked as private. @@ -192,7 +191,6 @@ function testNodeAccessLanguageAware() { $this->assertNodeAccess($expected_node_access, $this->nodes['no_language_public'], $this->webUser); // Query the node table with the node access tag in several languages. - // Query with no language specified. The fallback (hu) will be used. $select = db_select('node', 'n') ->fields('n', array('nid')) diff --git a/core/modules/node/tests/src/Unit/Plugin/migrate/source/d6/NodeByNodeTypeTest.php b/core/modules/node/tests/src/Unit/Plugin/migrate/source/d6/NodeByNodeTypeTest.php index 0c31810..689a42f 100644 --- a/core/modules/node/tests/src/Unit/Plugin/migrate/source/d6/NodeByNodeTypeTest.php +++ b/core/modules/node/tests/src/Unit/Plugin/migrate/source/d6/NodeByNodeTypeTest.php @@ -111,7 +111,6 @@ protected function setUp() { ); // Add another row with an article node and make sure it is not migrated. - foreach ($database_contents as $k => $row) { foreach (array('nid', 'vid', 'title', 'uid', 'body', 'teaser', 'format', 'timestamp', 'log') as $field) { $this->databaseContents['node_revisions'][$k][$field] = $row[$field]; diff --git a/core/modules/options/src/Tests/OptionsWidgetsTest.php b/core/modules/options/src/Tests/OptionsWidgetsTest.php index 23f0f0d..4cb55d5 100644 --- a/core/modules/options/src/Tests/OptionsWidgetsTest.php +++ b/core/modules/options/src/Tests/OptionsWidgetsTest.php @@ -296,7 +296,6 @@ function testSelectListSingle() { $this->assertFieldValues($entity_init, 'card_1', array()); // Test optgroups. - $this->card1->setSetting('allowed_values', []); $this->card1->setSetting('allowed_values_function', 'options_test_allowed_values_callback'); $this->card1->save(); @@ -392,7 +391,6 @@ function testSelectListMultiple() { $this->assertFieldValues($entity_init, 'card_2', array()); // Test the 'None' option. - // Check that the 'none' option has no effect if actual options are selected // as well. $edit = array('card_2[]' => array('_none' => '_none', 0 => 0)); @@ -412,9 +410,7 @@ function testSelectListMultiple() { // We do not have to test that a required select list with one option is // auto-selected because the browser does it for us. - // Test optgroups. - // Use a callback function defining optgroups. $this->card2->setSetting('allowed_values', []); $this->card2->setSetting('allowed_values_function', 'options_test_allowed_values_callback'); diff --git a/core/modules/rdf/src/Tests/StandardProfileTest.php b/core/modules/rdf/src/Tests/StandardProfileTest.php index e6c358d..643a96a 100644 --- a/core/modules/rdf/src/Tests/StandardProfileTest.php +++ b/core/modules/rdf/src/Tests/StandardProfileTest.php @@ -408,7 +408,6 @@ protected function assertRdfaArticleProperties($graph, $message_prefix) { // Tag type. // @todo Enable with https://www.drupal.org/node/2072791. //$this->assertEqual($graph->type($this->termUri), 'schema:Thing', 'Tag type was found (schema:Thing).'); - // Tag name. $expected_value = array( 'type' => 'literal', diff --git a/core/modules/rest/src/Tests/Views/StyleSerializerTest.php b/core/modules/rest/src/Tests/Views/StyleSerializerTest.php index 50e0e74..1dfe999 100644 --- a/core/modules/rest/src/Tests/Views/StyleSerializerTest.php +++ b/core/modules/rest/src/Tests/Views/StyleSerializerTest.php @@ -117,7 +117,6 @@ public function testSerializerResponses() { $this->assertCacheContexts(['languages:language_interface', 'theme', 'request_format']); // @todo Due to https://www.drupal.org/node/2352009 we can't yet test the // propagation of cache max-age. - // Test the http Content-type. $headers = $this->drupalGetHeaders(); $this->assertEqual($headers['content-type'], 'application/json', 'The header Content-type is correct.'); diff --git a/core/modules/search/search.module b/core/modules/search/search.module index c36aa44..7f83424 100644 --- a/core/modules/search/search.module +++ b/core/modules/search/search.module @@ -444,7 +444,6 @@ function search_index($type, $sid, $langcode, $text) { $split = preg_split('/\s*<([^>]+?)>\s*/', $text, -1, PREG_SPLIT_DELIM_CAPTURE); // Note: PHP ensures the array consists of alternating delimiters and literals // and begins and ends with a literal (inserting $null as required). - $tag = FALSE; // Odd/even counter. Tag or no tag. $score = 1; // Starting score per word $accum = ' '; // Accumulator for cleaned up data diff --git a/core/modules/search/src/Tests/SearchCommentTest.php b/core/modules/search/src/Tests/SearchCommentTest.php index f67637f..144da6e 100644 --- a/core/modules/search/src/Tests/SearchCommentTest.php +++ b/core/modules/search/src/Tests/SearchCommentTest.php @@ -194,7 +194,6 @@ function testSearchResultsComment() { // @todo Verify the actual search results. // https://www.drupal.org/node/2551135 - // Verify there is no script tag in search results. $this->assertNoRaw('