Unverified Commit 7dcb6fa2 authored by Alex Pott's avatar Alex Pott
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

(cherry picked from commit cc564e26)
parent cd6370b9
......@@ -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)) {
......
Supports Markdown
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