Skip to content

Commit

Permalink
Issue #3121362 by jungle, Meenakshi.g, dww, xjm, alexpott, tim.plunke…
Browse files Browse the repository at this point in the history
…tt: Fix duplicate word typos (the the, to to, etc.) for code comments
  • Loading branch information
alexpott committed Apr 17, 2020
1 parent 0dff68d commit 340a1ed
Show file tree
Hide file tree
Showing 44 changed files with 59 additions and 61 deletions.
2 changes: 1 addition & 1 deletion lib/Drupal/Component/FileSystem/RegexDirectoryIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class RegexDirectoryIterator extends \FilterIterator {
* /\.yml$/ would list only files ending in .yml.
*/
public function __construct($path, $regex) {
// Use FilesystemIterator to not iterate over the the . and .. directories.
// Use FilesystemIterator to not iterate over the . and .. directories.
$iterator = new \FilesystemIterator($path);
parent::__construct($iterator);
$this->regex = $regex;
Expand Down
2 changes: 1 addition & 1 deletion lib/Drupal/Core/Installer/Form/SelectProfileForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function buildForm(array $form, FormStateInterface $form_state, $install_
$extensions = $sync->read('core.extension');
$site = $sync->read('system.site');
if (isset($site['name']) && isset($extensions['profile']) && in_array($extensions['profile'], array_keys($names), TRUE)) {
// Ensure the the profile can be installed from configuration. Install
// Ensure the profile can be installed from configuration. Install
// profile's which implement hook_INSTALL() are not supported.
// @todo https://www.drupal.org/project/drupal/issues/2982052 Remove
// this restriction.
Expand Down
2 changes: 1 addition & 1 deletion lib/Drupal/Core/Menu/DefaultMenuLinkTreeManipulators.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function __construct(AccessManagerInterface $access_manager, AccountInter
* This is why inaccessible subtrees are deleted, except at the top-level
* inaccessible link: if we didn't keep the first (depth-wise) inaccessible
* link, we wouldn't be able to know which cache contexts would cause those
* subtrees to become accessible again, thus forcing us to conclude that that
* subtrees to become accessible again, thus forcing us to conclude that the
* subtree is unconditionally inaccessible.
*
* @param \Drupal\Core\Menu\MenuLinkTreeElement[] $tree
Expand Down
2 changes: 1 addition & 1 deletion lib/Drupal/Core/Menu/MenuLinkManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class MenuLinkManager implements MenuLinkManagerInterface {
// or other safe source this may be a TranslatableMarkup object.
'title' => '',
// The description. If this came from a YAML definition or other safe source
// this may be be a TranslatableMarkup object.
// this may be a TranslatableMarkup object.
'description' => '',
// The plugin ID of the parent link (or NULL for a top-level link).
'parent' => '',
Expand Down
2 changes: 1 addition & 1 deletion lib/Drupal/Core/Pager/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public function getCurrentPage() {
* Gets the maximum number of items per page.
*
* @return int
* The the maximum number of items per page.
* The maximum number of items per page.
*/
public function getLimit() {
return $this->limit;
Expand Down
2 changes: 1 addition & 1 deletion lib/Drupal/Core/Test/TestDiscovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function registerTestNamespaces() {
* An array of included test types.
*
* @return array
* An array of tests keyed by the the group name. If a test is annotated to
* An array of tests keyed by the group name. If a test is annotated to
* belong to multiple groups, it will appear under all group keys it belongs
* to.
* @code
Expand Down
2 changes: 1 addition & 1 deletion misc/tabledrag.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@
* @param {Drupal.tableDrag} self
* The drag handle.
* @param {HTMLElement} item
* The item that that is being dragged.
* The item that is being dragged.
*/
Drupal.tableDrag.prototype.dragStart = function(event, self, item) {
// Create a new dragObject recording the pointer information.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public function testViewsBlockForm() {
$this->drupalGet('admin/structure/block/add/views_block:test_view_block-block_1/' . $default_theme);
$elements = $this->xpath('//input[@name="label"]');
$this->assertTrue(empty($elements), 'The label field is not found for Views blocks.');
// Test that that machine name field is hidden from display and has been
// Test that the machine name field is hidden from display and has been
// saved as expected from the default value.
$this->assertNoFieldById('edit-machine-name', 'views_block__test_view_block_1', 'The machine name is hidden on the views block form.');

Expand Down
2 changes: 1 addition & 1 deletion modules/book/src/BookManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface BookManagerInterface {
* Gets the data structure representing a named menu tree.
*
* Since this can be the full tree including hidden items, the data returned
* may be used for generating an an admin interface or a select.
* may be used for generating an admin interface or a select.
*
* Note: based on menu_tree_all_data().
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen

// If the entity already exists, grab the most recent revision and load it.
// The moderation state of the saved revision will be used to display the
// current state as well determine the the appropriate transitions.
// current state as well determine the appropriate transitions.
if (!$entity->isNew()) {
/** @var \Drupal\Core\Entity\ContentEntityInterface $original_entity */
$original_entity = $this->entityTypeManager->getStorage($entity->getEntityTypeId())->loadRevision($entity->getLoadedRevisionId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public function testStateFilterViewsRelationship() {
'moderation_state' => 'editorial-draft',
], 'test_content_moderation_state_filter_revision_table');
// Creating a new forward revision of node three, creates a second published
// revision of of the original language, hence there are two published
// revision of the original language, hence there are two published
// revisions of node three.
$this->assertNodesWithFilters([$node, $third_node, $third_node], [
'moderation_state' => 'editorial-published',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ protected function getUploadLocation(array $settings) {
* Retrieves the upload validators for a field definition.
*
* This is copied from \Drupal\file\Plugin\Field\FieldType\FileItem as there
* is no entity instance available here that that a FileItem would exist for.
* is no entity instance available here that a FileItem would exist for.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition for which to get validators.
Expand Down
6 changes: 3 additions & 3 deletions modules/jsonapi/src/Context/FieldResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,9 @@ public static function resolveInternalIncludePath(ResourceType $resource_type, a
* elide the "entity" keyword from them (this word is used by the entity query
* system to traverse entity references).
*
* This method takes this external field expression and and attempts to
* resolve any aliases and/or abbreviations into a field expression that will
* be compatible with the entity query system.
* This method takes this external field expression and attempts to resolve
* any aliases and/or abbreviations into a field expression that will be
* compatible with the entity query system.
*
* @link http://jsonapi.org/recommendations/#urls-reference-document
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ protected function getUploadLocation(array $settings) {
* Retrieves the upload validators for a field definition.
*
* This is copied from \Drupal\file\Plugin\Field\FieldType\FileItem as there
* is no entity instance available here that that a FileItem would exist for.
* is no entity instance available here that a FileItem would exist for.
*
* @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition
* The field definition for which to get validators.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ trait ResourceIdentifierTrait {
protected $resourceIdentifier;

/**
* The JSON:API resource type of of the identified resource object.
* The JSON:API resource type of the identified resource object.
*
* @var \Drupal\jsonapi\ResourceType\ResourceType
*/
Expand Down
2 changes: 1 addition & 1 deletion modules/jsonapi/src/Query/EntityConditionGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function conjunction() {
}

/**
* The members which belong to the the condition group.
* The members which belong to the condition group.
*
* @return \Drupal\jsonapi\Query\EntityCondition[]
* The member conditions of this condition group.
Expand Down
2 changes: 1 addition & 1 deletion modules/jsonapi/src/Query/Sort.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Sort {
* ]
*
* @param array $fields
* The the entity query sort fields.
* The entity query sort fields.
*/
public function __construct(array $fields) {
$this->fields = $fields;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public function testPatchTranslation() {

// Changing the langcode of the default ('en') translation is possible:
// first verify that it currently is 'en', then change it to 'ca-fr', and
// verify that the the title is unchanged, but the langcode is updated.
// verify that the title is unchanged, but the langcode is updated.
$response = $this->request('GET', Url::fromUri('base:/jsonapi/node/article/' . $this->nodes[0]->uuid()), $request_options);
$this->assertSame(200, $response->getStatusCode());
$document = Json::decode((string) $response->getBody());
Expand Down
8 changes: 4 additions & 4 deletions modules/jsonapi/tests/src/Functional/ResourceTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -3017,9 +3017,9 @@ public function testRevisions() {
$forward_revision_id_url = $forward_revision_id_url->setOption('query', ['resourceVersion' => "id:$forward_revision_id"]);
$expected_document['data']['links']['self']['href'] = $forward_revision_id_url->setAbsolute()->toString();
$amend_relationship_urls($expected_document, $forward_revision_id);
// Since the the working copy is not the default revision. A
// `latest-version` link is required to indicate that the requested version
// is not the default revision.
// Since the working copy is not the default revision. A `latest-version`
// link is required to indicate that the requested version is not the
// default revision.
unset($expected_document['data']['links']['working-copy']);
$expected_document['data']['links']['latest-version']['href'] = $rel_latest_version_url->setAbsolute()->toString();
$expected_cache_tags = $this->getExpectedCacheTags();
Expand Down Expand Up @@ -3330,7 +3330,7 @@ protected static function entityFieldAccess(EntityInterface $entity, $field_name
}

/**
* Gets an array of of all nested include paths to be tested.
* Gets an array of all nested include paths to be tested.
*
* @param int $depth
* (optional) The maximum depth to which included paths should be nested.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ public function getLanguageSwitchLinks(Request $request, $type, Url $url) {
* \Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationContentEntity::processOutbound().
*
* @return bool
* TRUE if the the content entity language negotiator has higher priority
* than the url language negotiator, FALSE otherwise.
* TRUE if the content entity language negotiator has higher priority than
* the url language negotiator, FALSE otherwise.
*/
protected function hasLowerLanguageNegotiationWeight() {
if (!isset($this->hasLowerLanguageNegotiationWeightResult)) {
Expand Down
2 changes: 1 addition & 1 deletion modules/media/src/Access/MediaRevisionAccessCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function checkAccess(MediaInterface $media, AccountInterface $account, $o
* Counts the number of revisions in the default language.
*
* @param \Drupal\media\MediaInterface $media
* The media item for which to to count the revisions.
* The media item for which to count the revisions.
*
* @return int
* The number of revisions in the default language.
Expand Down
2 changes: 1 addition & 1 deletion modules/media/tests/src/Kernel/MediaKernelTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected function setUp() {
* @param string $filename
* String filename with extension.
* @param \Drupal\media\MediaTypeInterface $media_type
* The the media type.
* The media type.
*
* @return \Drupal\media\Entity\Media
* A media item.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @file
* Contains database additions to drupal-8.4.0-media_installed.php for testing
* the the addition of BEM classes to the media library views config.
* the addition of BEM classes to the media library views config.
*/

use Drupal\Core\Database\Database;
Expand Down
2 changes: 1 addition & 1 deletion modules/path_alias/tests/src/Kernel/AliasTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public function testWhitelistCacheDeletionMidRequest() {
$this->assertEquals(['user' => FALSE, 'admin' => TRUE], $memoryCounterBackend->get('path_alias_whitelist')->data);
$memoryCounterBackend->resetCounter();

// Re-initialize the the whitelist and lookup an alias for the 'user' path.
// Re-initialize the whitelist and lookup an alias for the 'user' path.
// Whitelist should load data from its cache, see that it hasn't done a
// check for 'user' yet, perform the check, then mark the result to be
// persisted to cache.
Expand Down
2 changes: 1 addition & 1 deletion modules/simpletest/src/TestDiscovery.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct($root, $class_loader, ModuleHandlerInterface $module
* An array of included test types.
*
* @return array
* An array of tests keyed by the the group name. If a test is annotated to
* An array of tests keyed by the group name. If a test is annotated to
* belong to multiple groups, it will appear under all group keys it belongs
* to.
* @code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ public static function deleteContentEntities($entity_type_id, &$context) {
$storage->delete($entities);
}
// Sometimes deletes cause secondary deletes. For example, deleting a
// taxonomy term can cause its children to be be deleted too.
// taxonomy term can cause its children to be deleted too.
$context['sandbox']['progress'] = $context['sandbox']['max'] - $storage->getQuery()->count()->execute();

// Inform the batch engine that we are not finished and provide an
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function testModulesListFormWithInvalidInfoFile() {
public function testRequiredByThemeMessage() {
$this->drupalGet('admin/modules');
$module_theme_depends_on_description = $this->getSession()->getPage()->findAll('css', '#edit-modules-test-module-required-by-theme-enable-description .admin-requirements li:contains("Test Theme Depending on Modules (theme) (disabled)")');
// Confirm that that 'Test Theme Depending on Modules' is listed as being
// Confirm that 'Test Theme Depending on Modules' is listed as being
// required by the module 'Test Module Required by Theme'.
$this->assertCount(1, $module_theme_depends_on_description);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class SitesDirectoryHardeningTest extends BrowserTestBase {
/**
* Tests the default behavior to restrict directory permissions is enforced.
*
* Checks both the the current sites directory and settings.php.
* Checks both the current sites directory and settings.php.
*/
public function testSitesDirectoryHardening() {
$site_path = $this->kernel->getSitePath();
Expand Down
4 changes: 2 additions & 2 deletions modules/system/tests/src/Functional/Theme/ThemeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ protected function setUp() {
* Ensures preprocess functions run even for suggestion implementations.
*
* The theme hook used by this test has its base preprocess function in a
* separate file, so this test also ensures that that file is correctly loaded
* separate file, so this test also ensures that the file is correctly loaded
* when needed.
*/
public function testPreprocessForSuggestions() {
Expand Down Expand Up @@ -171,7 +171,7 @@ public function testRegionClass() {
* Ensures suggestion preprocess functions run for default implementations.
*
* The theme hook used by this test has its base preprocess function in a
* separate file, so this test also ensures that that file is correctly loaded
* separate file, so this test also ensures that the file is correctly loaded
* when needed.
*/
public function testSuggestionPreprocessForDefaults() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TriggeringElementTest extends WebDriverTestBase {
protected $defaultTheme = 'stark';

/**
* Tests the the triggering element when no button information is included.
* Tests the triggering element when no button information is included.
*
* Test the determination of the triggering element when no button
* information is included in the POST data, as is sometimes the case when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,21 @@ public function testVocabularyFieldInstance() {

$this->assertSame([['node', 'article', 'field_tags']], $this->getMigration('d6_vocabulary_field_instance')->getIdMap()->lookupDestinationIds([4, 'article']));

// Test the the field vocabulary_1_i_0_ with multilingual option,
// Test the field vocabulary_1_i_0_ with multilingual option,
// 'per language terms'.
$field_id = 'node.story.field_vocabulary_1_i_0_';
$field = FieldConfig::load($field_id);
$this->assertFalse($field->isRequired(), 'Field is not required');
$this->assertTrue($field->isTranslatable());

// Test the the field vocabulary_2_i_0_ with multilingual option,
// Test the field vocabulary_2_i_0_ with multilingual option,
// 'Set language to vocabulary'.
$field_id = 'node.story.field_vocabulary_2_i_1_';
$field = FieldConfig::load($field_id);
$this->assertFalse($field->isRequired(), 'Field is not required');
$this->assertFalse($field->isTranslatable());

// Test the the field vocabulary_3_i_0_ with multilingual option,
// Test the field vocabulary_3_i_0_ with multilingual option,
// 'Localize terms'.
$field_id = 'node.story.field_vocabulary_3_i_2_';
$field = FieldConfig::load($field_id);
Expand Down
2 changes: 1 addition & 1 deletion modules/update/tests/src/Functional/UpdateCoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ public function testRevokedRelease() {
* 'supported_branches' is '8.0.,8.1.'.
* - drupal.1.0-unsupported.xml
* 'supported_branches' is '8.1.'.
* They both have an '8.0.3' release that that has the 'Release type' value of
* They both have an '8.0.3' release that has the 'Release type' value of
* 'unsupported' and an '8.1.0' release that has the 'Release type' value of
* 'supported' and is the expected update.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public function testUpdateImageStyleDependencies() {
// Checks that 'thumbnail' image style is not a dependency of view 'foo'.
$this->assertFalse(in_array('image.style.thumbnail', $config_dependencies));

// We test the case the the field formatter image style doesn't exist.
// We test the case that the field formatter image style doesn't exist.
// Checks that 'nonexistent' image style is not a dependency of view 'foo'.
$this->assertFalse(in_array('image.style.nonexistent', $config_dependencies));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function testBasicPagination() {

$settings = $this->getDrupalSettings();

// Make sure the the view_path is set correctly.
// Make sure that the view_path is set correctly.
$expected_view_path = '/test-content-ajax';
$this->assertEquals($expected_view_path, current($settings['views']['ajaxViews'])['view_path']);

Expand Down
8 changes: 4 additions & 4 deletions modules/views/tests/src/Kernel/Handler/FieldCounterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,15 @@ public function testPager() {
$this->assertEquals('1', $counter);
$view->destroy();

// Go the the second page.
// Go to the second page.
$view->setCurrentPage(1);
$view->preview();

$counter = $view->style_plugin->getField(0, 'counter');
$this->assertEquals('2', $counter);
$view->destroy();

// Go the the third page.
// Go to the third page.
$view->setCurrentPage(2);
$view->preview();

Expand Down Expand Up @@ -158,15 +158,15 @@ public function testPager() {
$this->assertEquals($counter_start, $counter);
$view->destroy();

// Go the the second page.
// Go to the second page.
$view->setCurrentPage(1);
$view->preview();

$counter = $view->style_plugin->getField(0, 'counter');
$this->assertEquals($counter_start + 1, $counter);
$view->destroy();

// Go the the third page.
// Go to the third page.
$view->setCurrentPage(2);
$view->preview();

Expand Down
2 changes: 1 addition & 1 deletion modules/workspaces/src/EntityQuery/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function prepare() {
$this->traitPrepare();

// If the prepare() method from the trait decided that we need to alter this
// query, we need to re-define the the key fields for fetchAllKeyed() as SQL
// query, we need to re-define the key fields for fetchAllKeyed() as SQL
// expressions.
if ($this->sqlQuery->getMetaData('active_workspace_id')) {
$id_field = $this->entityType->getKey('id');
Expand Down

0 comments on commit 340a1ed

Please sign in to comment.