Unverified Commit cc564e26 authored by alexpott's avatar alexpott
Browse files

Issue #3121362 by jungle, Meenakshi.g, dww, xjm, alexpott, tim.plunkett: Fix...

Issue #3121362 by jungle, Meenakshi.g, dww, xjm, alexpott, tim.plunkett: Fix duplicate word typos (the the, to to, etc.) for code comments
parent 8e9db429
......@@ -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;
......
......@@ -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.
......
......@@ -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
......
......@@ -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' => '',
......
......@@ -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;
......
......@@ -133,7 +133,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
......
......@@ -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.
......
......@@ -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.');
......
......@@ -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().
*
......
......@@ -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());
......
......@@ -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',
......
......@@ -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.
......
......@@ -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
*
......
......@@ -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.
......
......@@ -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
*/
......
......@@ -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.
......
......@@ -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;
......
......@@ -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());
......
......@@ -3021,9 +3021,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();
......@@ -3334,7 +3334,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.
......
......@@ -163,8 +163,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)) {
......
......@@ -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.
......
......@@ -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.
......
......@@ -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.
......
......@@ -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
......
......@@ -116,7 +116,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);
// Confirm that the required by message does not appear anywhere else.
......
......@@ -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();
......
......@@ -37,7 +37,7 @@ protected function setUp(): void {
* 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() {
......@@ -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() {
......
......@@ -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
......
......@@ -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);
......
......@@ -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.
*/
......
......@@ -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']);
......
......@@ -116,7 +116,7 @@ public function testPager() {
$this->assertEquals('1', $counter);
$view->destroy();
// Go the the second page.
// Go to the second page.
$view->setCurrentPage(1);
$view->preview();
......@@ -124,7 +124,7 @@ public function testPager() {
$this->assertEquals('2', $counter);
$view->destroy();
// Go the the third page.
// Go to the third page.
$view->setCurrentPage(2);
$view->preview();
......@@ -158,7 +158,7 @@ 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();
......@@ -166,7 +166,7 @@ public function testPager() {
$this->assertEquals($counter_start + 1, $counter);
$view->destroy();
// Go the the third page.
// Go to the third page.
$view->setCurrentPage(2);
$view->preview();
......
......@@ -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');
......
......@@ -146,10 +146,10 @@ public function testCollectionDiff() {
* @param string $type
* The type of edit that is being asserted.
* @param mixed $orig
* (optional) The original value of of the edit. If not supplied, assertion
* (optional) The original value of the edit. If not supplied, assertion
* is skipped.
* @param mixed $closing
* (optional) The closing value of of the edit. If not supplied, assertion
* (optional) The closing value of the edit. If not supplied, assertion
* is skipped.
*/
protected function assertYamlEdit(array $edits, $field, $type, $orig = NULL, $closing = NULL) {
......
......@@ -93,7 +93,7 @@ public function providerTestUnexpectedPlaceholder() {
return [
['Non alpha starting character: ~placeholder', ['~placeholder' => 'replaced'], E_USER_ERROR, 'Invalid placeholder (~placeholder) in string: Non alpha starting character: ~placeholder'],
['Alpha starting character: placeholder', ['placeholder' => 'replaced'], E_USER_DEPRECATED, 'Invalid placeholder (placeholder) in string: Alpha starting character: placeholder'],
// Ensure that where the placeholder is located in the the string is
// Ensure that where the placeholder is located in the string is
// irrelevant.
['placeholder', ['placeholder' => 'replaced'], E_USER_DEPRECATED, 'Invalid placeholder (placeholder) in string: placeholder'],
];
......
......@@ -38,7 +38,7 @@ public function testOnExceptionWithUnknownFormat() {
$this->stringStartsWith('The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException</em>: test message in ', $response->getContent());
$this->assertEquals(405, $response->getStatusCode());
$this->assertEquals('POST, PUT', $response->headers->get('Allow'));
// Also check that that text/plain content type was added.
// Also check that the text/plain content type was added.
$this->assertEquals('text/plain', $response->headers->get('Content-Type'));
}
......
......@@ -413,7 +413,7 @@
}
/**
* Set the the inherited button border color to transparent for high contrast
* Set the inherited button border color to transparent for high contrast
* mode.
*/
......
......@@ -353,7 +353,7 @@
}
/**
* Set the the inherited button border color to transparent for high contrast
* Set the inherited button border color to transparent for high contrast
* mode.
*/
@media screen and (-ms-high-contrast: active) {
......
......@@ -817,7 +817,7 @@
* @param {Drupal.tableDrag} self
* The drag handle.
* @param {HTMLElement} item
* The item that that is being dragged.
* The item that is being dragged.
*/
dragStart(event, self, item) {
// Create a new dragObject recording the pointer information.
......
{#
/**
* @file
* Theme override to to present a list of available bundles.
* Theme override to present a list of available bundles.
*
* Available variables:
* - bundles: A list of bundles, each with the following properties:
......
{#
/**
* @file
* Theme override to to present a list of available bundles.
* Theme override to present a list of available bundles.
*
* Available variables:
* - bundles: A list of bundles, each with the following properties:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment