diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php index f952c3e..12f084d 100644 --- a/core/lib/Drupal/Core/DrupalKernel.php +++ b/core/lib/Drupal/Core/DrupalKernel.php @@ -456,7 +456,7 @@ public function boot() { // Provide a default configuration, if not set. if (!isset($configuration['default'])) { // @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'; } @@ -992,7 +992,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. - if (PHP_SAPI !== 'cli') { // Use session cookies, not transparent sessions that puts the session id // in the query string. diff --git a/core/lib/Drupal/Core/Entity/ContentEntityBase.php b/core/lib/Drupal/Core/Entity/ContentEntityBase.php index 8e85d4c..d322317 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityBase.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityBase.php @@ -588,7 +588,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])) { @@ -1183,7 +1182,6 @@ public function __clone() { // before cloning the fields. Otherwise calling // $items->getEntity()->isNew(), for example, would return the // $enforceIsNew value of the old entity. - // Ensure the translations array is actually cloned by overwriting the // original reference with one pointing to a copy of the array. $translations = $this->translations; @@ -1434,7 +1432,7 @@ public function hasTranslationChanges() { 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 (in_array($field_name, $skip_fields, TRUE) || ($skip_untranslatable_fields && !$definition->isTranslatable())) { continue; } diff --git a/core/lib/Drupal/Core/Entity/EntityFieldManager.php b/core/lib/Drupal/Core/Entity/EntityFieldManager.php index cfc8580..5b1603d 100644 --- a/core/lib/Drupal/Core/Entity/EntityFieldManager.php +++ b/core/lib/Drupal/Core/Entity/EntityFieldManager.php @@ -261,7 +261,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); } @@ -275,7 +275,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); } @@ -383,7 +383,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); } @@ -397,7 +397,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); } @@ -573,7 +573,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/File/MimeType/ExtensionMimeTypeGuesser.php b/core/lib/Drupal/Core/File/MimeType/ExtensionMimeTypeGuesser.php index 056f627..54828da 100644 --- a/core/lib/Drupal/Core/File/MimeType/ExtensionMimeTypeGuesser.php +++ b/core/lib/Drupal/Core/File/MimeType/ExtensionMimeTypeGuesser.php @@ -904,9 +904,9 @@ public function guess($path) { // Iterate over the file parts, trying to find a match. // For my.awesome.image.jpeg, we try: - // - jpeg - // - image.jpeg, and - // - awesome.image.jpeg + // - jpeg + // - image.jpeg, and + // - awesome.image.jpeg while ($additional_part = array_pop($file_parts)) { $extension = strtolower($additional_part . ($extension ? '.' . $extension : '')); if (isset($this->mapping['extensions'][$extension])) { diff --git a/core/lib/Drupal/Core/Form/FormSubmitter.php b/core/lib/Drupal/Core/Form/FormSubmitter.php index f3260e2..a3d116d 100644 --- a/core/lib/Drupal/Core/Form/FormSubmitter.php +++ b/core/lib/Drupal/Core/Form/FormSubmitter.php @@ -101,7 +101,7 @@ public function executeSubmitHandlers(&$form, FormStateInterface &$form_state) { // Check if a previous _submit handler has set a batch, but make sure we // do not react to a batch that is already being processed (for instance // if a batch operation performs a - // \Drupal\Core\Form\FormBuilderInterface::submitForm()). + // \Drupal\Core\Form\FormBuilderInterface::submitForm()). if (($batch = &$this->batchGet()) && !isset($batch['id'])) { // Some previous submit handler has set a batch. To ensure correct // execution order, store the call in a special 'control' batch set. diff --git a/core/lib/Drupal/Core/Render/RenderCache.php b/core/lib/Drupal/Core/Render/RenderCache.php index 20e4b0c..7cb878b 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 isMethodCacheable() check when - // https://www.drupal.org/node/2367555 lands. + // https://www.drupal.org/node/2367555 lands. if (!$this->requestStack->getCurrentRequest()->isMethodCacheable() || !$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 isMethodCacheable() check when - // https://www.drupal.org/node/2367555 lands. + // https://www.drupal.org/node/2367555 lands. if (!$this->requestStack->getCurrentRequest()->isMethodCacheable() || !$cid = $this->createCacheID($elements)) { return FALSE; } diff --git a/core/lib/Drupal/Core/Render/Renderer.php b/core/lib/Drupal/Core/Render/Renderer.php index 559c256..eeb831e 100644 --- a/core/lib/Drupal/Core/Render/Renderer.php +++ b/core/lib/Drupal/Core/Render/Renderer.php @@ -343,7 +343,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 isMethodCacheable() 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()->isMethodCacheable()) { 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/Validation/DrupalTranslator.php b/core/lib/Drupal/Core/Validation/DrupalTranslator.php index 12b9594..4025fed 100644 --- a/core/lib/Drupal/Core/Validation/DrupalTranslator.php +++ b/core/lib/Drupal/Core/Validation/DrupalTranslator.php @@ -43,7 +43,7 @@ public function transChoice($id, $number, array $parameters = [], $domain = NULL } // Normally, calls to formatPlural() need to use literal strings, like - // formatPlural($count, '1 item', '@count items') + // formatPlural($count, '1 item', '@count items') // so that the Drupal project POTX string extractor will correctly // extract the strings for translation and save them in a format that // formatPlural() can work with. However, this is a special case, because diff --git a/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php b/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php index 91e892e..484c457 100644 --- a/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php +++ b/core/modules/language/tests/src/Functional/LanguageConfigurationTest.php @@ -110,7 +110,7 @@ public 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 = [ 'prefix[en]' => 'foo/bar', ]; diff --git a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php index 278e801..8b8c370 100644 --- a/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php +++ b/core/modules/link/src/Plugin/Field/FieldWidget/LinkWidget.php @@ -74,7 +74,7 @@ protected static function getUriAsDisplayableString($uri) { list($entity_type, $entity_id) = explode('/', substr($uri, 7), 2); // Show the 'entity:' URI as the entity autocomplete would. // @todo Support entity types other than 'node'. Will be fixed in - // https://www.drupal.org/node/2423093. + // https://www.drupal.org/node/2423093. if ($entity_type == 'node' && $entity = \Drupal::entityTypeManager()->getStorage($entity_type)->load($entity_id)) { $displayable_string = EntityAutocomplete::getEntityLabels([$entity]); } @@ -111,7 +111,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; } // Support linking to nothing. @@ -202,7 +202,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/migrate/src/Plugin/migrate/source/SqlBase.php b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php index ec22c3f..53354fa 100644 --- a/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php +++ b/core/modules/migrate/src/Plugin/migrate/source/SqlBase.php @@ -276,7 +276,7 @@ protected function initializeIterator() { // conditions, so we need to OR them together (but AND with any existing // conditions in the query). So, ultimately the SQL condition will look // like (original conditions) AND (map IS NULL OR map needs update - // OR above high water). + // OR above high water). $conditions = $this->query->orConditionGroup(); $condition_added = FALSE; $added_fields = []; diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module index 8eb2c3d..4be9a76 100644 --- a/core/modules/system/tests/modules/entity_test/entity_test.module +++ b/core/modules/system/tests/modules/entity_test/entity_test.module @@ -175,7 +175,7 @@ function entity_test_entity_base_field_info_alter(&$fields, EntityTypeInterface // In 8001 we are assuming that a new definition with multiple cardinality has // been deployed. // @todo Remove this if we end up using state definitions at runtime. See - // https://www.drupal.org/node/2554235. + // https://www.drupal.org/node/2554235. if ($entity_type->id() == 'entity_test' && $state->get('entity_test.db_updates.entity_definition_updates') == 8001) { $fields['user_id']->setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED); } diff --git a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php index 987f815..826ec33 100644 --- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php +++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTidDepth.php @@ -61,7 +61,7 @@ public function query() { // The normal use of ensureMyTable() here breaks Views. // So instead we trick the filter into using the alias of the base table. - // See https://www.drupal.org/node/271833. + // See https://www.drupal.org/node/271833. // If a relationship is set, we must use the alias it provides. if (!empty($this->relationship)) { $this->tableAlias = $this->relationship; diff --git a/core/modules/update/src/UpdateProcessor.php b/core/modules/update/src/UpdateProcessor.php index 25dfc7a..3816a33 100644 --- a/core/modules/update/src/UpdateProcessor.php +++ b/core/modules/update/src/UpdateProcessor.php @@ -162,7 +162,7 @@ public function processFetchTask($project) { if (!empty($data)) { $available = $this->parseXml($data); // @todo: Purge release data we don't need. See - // https://www.drupal.org/node/238950. + // https://www.drupal.org/node/238950. if (!empty($available)) { // Only if we fetched and parsed something sane do we return success. $success = TRUE; diff --git a/core/modules/update/tests/src/Functional/UpdateContribTest.php b/core/modules/update/tests/src/Functional/UpdateContribTest.php index 14b2a53..48ae0cc 100644 --- a/core/modules/update/tests/src/Functional/UpdateContribTest.php +++ b/core/modules/update/tests/src/Functional/UpdateContribTest.php @@ -209,7 +209,7 @@ public function testUpdateContribOrder() { */ public function testUpdateBaseThemeSecurityUpdate() { // @todo https://www.drupal.org/node/2338175 base themes have to be - // installed. + // installed. // Only install the subtheme, not the base theme. \Drupal::service('theme_installer')->install(['update_test_subtheme']); diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php index 9ee3704..be61c32 100644 --- a/core/modules/views/src/ViewExecutable.php +++ b/core/modules/views/src/ViewExecutable.php @@ -1467,7 +1467,7 @@ public function render($display_id = NULL) { $module_handler = \Drupal::moduleHandler(); - // @TODO In the longrun, it would be great to execute a view without + // @todo In the longrun, it would be great to execute a view without // the theme system at all. See https://www.drupal.org/node/2322623. $active_theme = \Drupal::theme()->getActiveTheme(); $themes = array_keys($active_theme->getBaseThemeExtensions());