From c31d595f986e48e67214e92b5ecd3bdbb03b58e2 Mon Sep 17 00:00:00 2001 From: catch <6915-catch@users.noreply.drupalcode.org> Date: Fri, 19 Jul 2024 21:30:26 +0900 Subject: [PATCH] Issue #2719657 by quietone, andypost, Mile23, Spokje, ilya.no, xjm, alexpott, smustgrave: Fix 'Drupal.Commenting.InlineComment.NotCapital' coding standard --- .../lib/Drupal/Core/Config/ConfigImporter.php | 2 +- .../Drupal/Core/FileTransfer/FTPExtension.php | 2 +- core/lib/Drupal/Core/Form/FormState.php | 2 +- .../Core/Render/Element/ImageButton.php | 2 +- core/lib/Drupal/Core/Routing/UrlGenerator.php | 8 ++++---- .../Drupal/Core/StreamWrapper/LocalStream.php | 4 ++-- .../Drupal/Core/Theme/ThemeInitialization.php | 4 ++-- .../views/field/StatisticsLastCommentName.php | 2 +- .../Functional/ConfigTranslationUiTest.php | 2 +- .../file/tests/src/Kernel/CopyTest.php | 1 - .../tests/src/Kernel/FileRepositoryTest.php | 1 - .../file/tests/src/Kernel/MoveTest.php | 2 -- core/modules/filter/filter.module | 14 ++++++------- core/modules/node/node.views.inc | 2 +- .../src/Plugin/migrate/source/d6/Node.php | 2 +- .../src/StackMiddleware/PageCache.php | 2 +- .../tests/src/Functional/PathAliasTest.php | 2 +- .../modules/path_alias/src/AliasWhitelist.php | 2 +- .../Database/SelectTableSortDefaultTest.php | 4 ++-- .../FileTransfer/FileTransferTest.php | 2 +- .../d6/MigrateSystemConfigurationTest.php | 20 +++++++++---------- .../d7/MigrateSystemConfigurationTest.php | 12 +++++------ .../views/argument/IndexTidDepthModifier.php | 2 +- .../src/Plugin/views/argument_default/Tid.php | 2 +- .../Plugin/views/filter/TaxonomyIndexTid.php | 4 ++-- .../views/relationship/NodeTermData.php | 2 +- core/modules/taxonomy/src/TermViewsData.php | 4 ++-- .../Plugin/views/argument_validator/User.php | 2 +- .../user/src/Plugin/views/filter/Name.php | 4 ++-- .../tests/src/Kernel/UserValidationTest.php | 2 +- core/modules/user/user.api.php | 2 +- core/modules/views/src/ManyToOneHelper.php | 6 +++--- .../views/src/Plugin/views/HandlerBase.php | 4 ++-- .../views/argument/ArgumentPluginBase.php | 10 +++++----- .../src/Plugin/views/argument/DayDate.php | 3 ++- .../src/Plugin/views/argument/ManyToOne.php | 2 +- .../Plugin/views/argument/NumericArgument.php | 2 +- .../Plugin/views/argument/StringArgument.php | 2 +- .../views/src/Plugin/views/display/Page.php | 2 +- .../views/src/Plugin/views/field/Counter.php | 2 +- .../views/src/Plugin/views/field/Custom.php | 2 +- .../Plugin/views/field/FieldPluginBase.php | 2 +- .../views/src/Plugin/views/filter/Date.php | 2 +- .../Plugin/views/filter/FilterPluginBase.php | 2 +- .../src/Plugin/views/filter/InOperator.php | 4 ++-- .../src/Plugin/views/filter/ManyToOne.php | 2 +- .../src/Plugin/views/filter/NumericFilter.php | 4 ++-- .../src/Plugin/views/filter/StringFilter.php | 6 +++--- .../views/src/Plugin/views/query/Sql.php | 12 +++++------ .../src/Plugin/views/query/SqliteDateSql.php | 2 +- .../views/relationship/EntityReverse.php | 2 +- .../views/relationship/GroupwiseMax.php | 2 +- .../relationship/RelationshipPluginBase.php | 2 +- .../views/src/Plugin/views/style/Table.php | 6 +++--- core/modules/views/src/ViewExecutable.php | 18 ++++++++--------- core/modules/views/src/Views.php | 2 +- core/modules/views/src/ViewsDataHelper.php | 2 +- .../src/Functional/Plugin/DisplayTest.php | 2 +- .../tests/src/Functional/Plugin/PagerTest.php | 2 +- ...sEntitySchemaSubscriberIntegrationTest.php | 12 +++++------ .../tests/src/Kernel/Handler/AreaTextTest.php | 2 +- .../src/Kernel/Handler/ArgumentNullTest.php | 2 +- .../src/Kernel/Handler/FieldBooleanTest.php | 2 +- .../Unit/Plugin/field/FieldPluginBaseTest.php | 2 +- core/modules/views/views.api.php | 4 ++-- core/modules/views/views.theme.inc | 2 +- .../views_ui/src/Form/Ajax/ConfigHandler.php | 4 ++-- .../views_ui/src/Form/Ajax/Rearrange.php | 2 +- .../src/Form/Ajax/RearrangeFilter.php | 2 +- .../views_ui/src/Form/Ajax/ViewsFormBase.php | 4 ++-- core/modules/views_ui/src/ViewUI.php | 4 ++-- core/modules/views_ui/views_ui.module | 2 +- core/phpcs.xml.dist | 1 - .../BuildTests/Framework/BuildTestBase.php | 2 +- .../Core/Entity/EntityTranslationTest.php | 2 +- .../Core/Extension/ModuleHandlerTest.php | 2 +- .../Core/Render/RendererPlaceholdersTest.php | 2 +- .../Tests/Core/Test/TestDiscoveryTest.php | 2 +- 78 files changed, 139 insertions(+), 143 deletions(-) diff --git a/core/lib/Drupal/Core/Config/ConfigImporter.php b/core/lib/Drupal/Core/Config/ConfigImporter.php index 4db121aebc52..f16210fc8d98 100644 --- a/core/lib/Drupal/Core/Config/ConfigImporter.php +++ b/core/lib/Drupal/Core/Config/ConfigImporter.php @@ -415,7 +415,7 @@ protected function createExtensionChangelist() { // 'text' => -1, // ); // @endcode - // will result in the following sort order: + // Will result in the following sort order: // 1. -2 options // 2. -1 text // 3. 0 0 ban diff --git a/core/lib/Drupal/Core/FileTransfer/FTPExtension.php b/core/lib/Drupal/Core/FileTransfer/FTPExtension.php index 27682fe74125..8a23d701bf35 100644 --- a/core/lib/Drupal/Core/FileTransfer/FTPExtension.php +++ b/core/lib/Drupal/Core/FileTransfer/FTPExtension.php @@ -108,7 +108,7 @@ public function chmodJailed($path, $mode, $recursive) { if ($this->isDirectory($path) && $recursive) { $file_list = @ftp_nlist($this->connection, $path); if (!$file_list) { - // empty directory - returns false + // Empty directory - returns false return; } foreach ($file_list as $file) { diff --git a/core/lib/Drupal/Core/Form/FormState.php b/core/lib/Drupal/Core/Form/FormState.php index e4820864e61e..7e639c355d94 100644 --- a/core/lib/Drupal/Core/Form/FormState.php +++ b/core/lib/Drupal/Core/Form/FormState.php @@ -1271,7 +1271,7 @@ public function cleanValues() { // @code // array('foo', 'bar', 'baz') // @endcode - // then the corresponding self::getValues() part will look like this: + // Then the corresponding self::getValues() part will look like this: // @code // array( // 'foo' => array( diff --git a/core/lib/Drupal/Core/Render/Element/ImageButton.php b/core/lib/Drupal/Core/Render/Element/ImageButton.php index 99b01bb25faa..f34ab63eb62f 100644 --- a/core/lib/Drupal/Core/Render/Element/ImageButton.php +++ b/core/lib/Drupal/Core/Render/Element/ImageButton.php @@ -45,7 +45,7 @@ public static function valueCallback(&$element, $input, FormStateInterface $form // in the same spot for its name, with '_x'. $input = $form_state->getUserInput(); foreach (explode('[', $element['#name']) as $element_name) { - // chop off the ] that may exist. + // Chop off the ] that may exist. if (str_ends_with($element_name, ']')) { $element_name = substr($element_name, 0, -1); } diff --git a/core/lib/Drupal/Core/Routing/UrlGenerator.php b/core/lib/Drupal/Core/Routing/UrlGenerator.php index 61ffe8048657..9aed80640121 100644 --- a/core/lib/Drupal/Core/Routing/UrlGenerator.php +++ b/core/lib/Drupal/Core/Routing/UrlGenerator.php @@ -61,7 +61,7 @@ class UrlGenerator implements UrlGeneratorInterface { * @see \Symfony\Component\Routing\Generator\UrlGenerator */ protected $decodedChars = [ - // the slash can be used to designate a hierarchical structure and we want allow using it with this meaning + // The slash can be used to designate a hierarchical structure and we want allow using it with this meaning // some webservers don't allow the slash in encoded form in the path for security reasons anyway // see http://stackoverflow.com/questions/4069002/http-400-if-2f-part-of-get-url-in-jboss // Map from these encoded characters. @@ -175,7 +175,7 @@ protected function doGenerate(array $variables, array $defaults, array $tokens, $variables = array_flip($variables); $mergedParams = array_replace($defaults, $this->context->getParameters(), $parameters); - // all params must be given + // All params must be given if ($diff = array_diff_key($variables, $mergedParams)) { throw new MissingMandatoryParametersException($name, array_keys($diff)); } @@ -196,7 +196,7 @@ protected function doGenerate(array $variables, array $defaults, array $tokens, foreach ($tokens as $token) { if ('variable' === $token[0]) { if (!$optional || !array_key_exists($token[3], $defaults) || (isset($mergedParams[$token[3]]) && (string) $mergedParams[$token[3]] !== (string) $defaults[$token[3]])) { - // check requirement + // Check requirement if (!preg_match('#^' . $token[2] . '$#', $mergedParams[$token[3]])) { $message = sprintf('Parameter "%s" for route "%s" must match "%s" ("%s" given) to generate a corresponding URL.', $token[3], $name, $token[2], $mergedParams[$token[3]]); throw new InvalidParameterException($message); @@ -304,7 +304,7 @@ public function generateFromRoute(string $name, array $parameters = [], array $o // Drupal paths rarely include dots, so skip this processing if possible. if (str_contains($path, '/.')) { - // the path segments "." and ".." are interpreted as relative reference when + // The path segments "." and ".." are interpreted as relative reference when // resolving a URI; see http://tools.ietf.org/html/rfc3986#section-3.3 // so we need to encode them as they are not used for this purpose here // otherwise we would generate a URI that, when followed by a user agent diff --git a/core/lib/Drupal/Core/StreamWrapper/LocalStream.php b/core/lib/Drupal/Core/StreamWrapper/LocalStream.php index 01a8e24c9f85..f02a37bf3c5b 100644 --- a/core/lib/Drupal/Core/StreamWrapper/LocalStream.php +++ b/core/lib/Drupal/Core/StreamWrapper/LocalStream.php @@ -198,8 +198,8 @@ public function stream_eof() { * {@inheritdoc} */ public function stream_seek($offset, $whence = SEEK_SET) { - // fseek returns 0 on success and -1 on a failure. - // stream_seek 1 on success and 0 on a failure. + // fseek() returns 0 on success and -1 on a failure. + // stream_seek() 1 on success and 0 on a failure. return !fseek($this->handle, $offset, $whence); } diff --git a/core/lib/Drupal/Core/Theme/ThemeInitialization.php b/core/lib/Drupal/Core/Theme/ThemeInitialization.php index 85ad5ee52347..8f4ef074f57d 100644 --- a/core/lib/Drupal/Core/Theme/ThemeInitialization.php +++ b/core/lib/Drupal/Core/Theme/ThemeInitialization.php @@ -137,14 +137,14 @@ public function loadActiveTheme(ActiveTheme $active_theme) { $active_theme->getExtension()->load(); } else { - // include non-engine theme files + // Include non-engine theme files foreach (array_reverse($active_theme->getBaseThemeExtensions()) as $base) { // Include the theme file or the engine. if ($base->owner) { include_once $this->root . '/' . $base->owner; } } - // and our theme gets one too. + // And our theme gets one too. if ($active_theme->getOwner()) { include_once $this->root . '/' . $active_theme->getOwner(); } diff --git a/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php b/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php index 5e1433afff8a..811258c8a243 100644 --- a/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php +++ b/core/modules/comment/src/Plugin/views/field/StatisticsLastCommentName.php @@ -39,7 +39,7 @@ public function query() { // last_comment_name only contains data if the user is anonymous. So we // have to join in a specially related user table. $this->ensureMyTable(); - // join 'users' to this table via vid + // Join 'users' to this table via vid $definition = [ 'table' => 'users_field_data', 'field' => 'uid', diff --git a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php index ed2bf54955bc..6a2ca26a125f 100644 --- a/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php +++ b/core/modules/config_translation/tests/src/Functional/ConfigTranslationUiTest.php @@ -234,7 +234,7 @@ public function testLocaleDBStorage(): void { $translation = $this->getTranslation('user.settings', 'anonymous', 'fr'); $this->assertEquals('Anonyme', $translation->getString()); - // revert custom translations to base translation. + // Revert custom translations to base translation. $edit = [ 'translation[config_names][user.settings][anonymous]' => 'Anonymous', ]; diff --git a/core/modules/file/tests/src/Kernel/CopyTest.php b/core/modules/file/tests/src/Kernel/CopyTest.php index 7f3f70b759df..2f043ad2bd69 100644 --- a/core/modules/file/tests/src/Kernel/CopyTest.php +++ b/core/modules/file/tests/src/Kernel/CopyTest.php @@ -167,7 +167,6 @@ public function testExistingError(): void { } // FileExistsException is a subclass of FileException. catch (FileExistsException $e) { - // expected exception. $this->assertStringContainsString("could not be copied because a file by that name already exists in the destination directory", $e->getMessage()); } // Check the contents were not changed. diff --git a/core/modules/file/tests/src/Kernel/FileRepositoryTest.php b/core/modules/file/tests/src/Kernel/FileRepositoryTest.php index fc5283c620c2..67dd7bbe6190 100644 --- a/core/modules/file/tests/src/Kernel/FileRepositoryTest.php +++ b/core/modules/file/tests/src/Kernel/FileRepositoryTest.php @@ -153,7 +153,6 @@ public function testExistingError(): void { } // FileExistsException is a subclass of FileException. catch (FileExistsException $e) { - // expected exception. $this->assertStringContainsString("could not be copied because a file by that name already exists in the destination directory", $e->getMessage()); } $this->assertEquals($contents, file_get_contents($existing->getFileUri()), 'Contents of existing file were unchanged.'); diff --git a/core/modules/file/tests/src/Kernel/MoveTest.php b/core/modules/file/tests/src/Kernel/MoveTest.php index e82626c1f211..78cac80f3130 100644 --- a/core/modules/file/tests/src/Kernel/MoveTest.php +++ b/core/modules/file/tests/src/Kernel/MoveTest.php @@ -155,7 +155,6 @@ public function testExistingReplaceSelf(): void { $this->fail('expected FileExistsException'); } catch (FileExistsException $e) { - // expected exception. $this->assertStringContainsString("could not be copied because a file by that name already exists in the destination directory", $e->getMessage()); } $this->assertEquals($contents, file_get_contents($source->getFileUri()), 'Contents of file were not altered.'); @@ -187,7 +186,6 @@ public function testExistingError(): void { } // FileExistsException is a subclass of FileException. catch (FileExistsException $e) { - // expected exception. $this->assertStringContainsString("could not be copied because a file by that name already exists in the destination directory", $e->getMessage()); } // Check the return status and that the contents did not change. diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module index e0adbc162092..09367b65c1bf 100644 --- a/core/modules/filter/filter.module +++ b/core/modules/filter/filter.module @@ -494,7 +494,7 @@ function _filter_url($text, $filter) { $valid_url_query_chars = '[a-zA-Z0-9!?\*\'@\(\);:&=\+\$\/%#\[\]\-_\.,~|]'; $valid_url_query_ending_chars = '[a-zA-Z0-9_&=#\/]'; - // full path + // Full path // and allow @ in a URL, but only in the middle. Catch things like http://example.com/@user/ $valid_url_path = '(?:(?:' . $valid_url_path_characters . '*(?:' . $valid_url_balanced_parens . $valid_url_path_characters . '*)*' . $valid_url_ending_characters . ')|(?:@' . $valid_url_path_characters . '+\/))'; @@ -755,27 +755,27 @@ function _filter_autop($text) { } } - // just to make things a little easier, pad the end + // Just to make things a little easier, pad the end $chunk = preg_replace('|\n*$|', '', $chunk) . "\n\n"; $chunk = preg_replace('|<br />\s*<br />|', "\n\n", $chunk); // Space things out a little $chunk = preg_replace('!(<' . $block . '[^>]*>)!', "\n$1", $chunk); // Space things out a little $chunk = preg_replace('!(</' . $block . '>)!', "$1\n\n", $chunk); - // take care of duplicates + // Take care of duplicates $chunk = preg_replace("/\n\n+/", "\n\n", $chunk); $chunk = preg_replace('/^\n|\n\s*\n$/', '', $chunk); - // make paragraphs, including one at the end + // Make paragraphs, including one at the end $chunk = '<p>' . preg_replace('/\n\s*\n\n?(.)/', "</p>\n<p>$1", $chunk) . "</p>\n"; - // problem with nested lists + // Problem with nested lists $chunk = preg_replace("|<p>(<li.+?)</p>|", "$1", $chunk); $chunk = preg_replace('|<p><blockquote([^>]*)>|i', "<blockquote$1><p>", $chunk); $chunk = str_replace('</blockquote></p>', '</p></blockquote>', $chunk); - // under certain strange conditions it could create a P of entirely whitespace + // Under certain strange conditions it could create a P of entirely whitespace $chunk = preg_replace('|<p>\s*</p>\n?|', '', $chunk); $chunk = preg_replace('!<p>\s*(</?' . $block . '[^>]*>)!', "$1", $chunk); $chunk = preg_replace('!(</?' . $block . '[^>]*>)\s*</p>!', "$1", $chunk); - // make line breaks + // Make line breaks $chunk = preg_replace('|(?<!<br />)\s*\n|', "<br />\n", $chunk); $chunk = preg_replace('!(</?' . $block . '[^>]*>)\s*<br />!', "$1", $chunk); $chunk = preg_replace('!<br />(\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)>)!', '$1', $chunk); diff --git a/core/modules/node/node.views.inc b/core/modules/node/node.views.inc index 83e2ccf02056..28f545271208 100644 --- a/core/modules/node/node.views.inc +++ b/core/modules/node/node.views.inc @@ -19,7 +19,7 @@ function node_views_analyze(ViewExecutable $view) { if ($view->storage->get('base_table') == 'node') { foreach ($view->displayHandlers as $display) { if (!$display->isDefaulted('access') || !$display->isDefaulted('filters')) { - // check for no access control + // Check for no access control $access = $display->getOption('access'); if (empty($access['type']) || $access['type'] == 'none') { $anonymous_role = Role::load(RoleInterface::ANONYMOUS_ID); diff --git a/core/modules/node/src/Plugin/migrate/source/d6/Node.php b/core/modules/node/src/Plugin/migrate/source/d6/Node.php index 84548bee0322..296cc74b1d57 100644 --- a/core/modules/node/src/Plugin/migrate/source/d6/Node.php +++ b/core/modules/node/src/Plugin/migrate/source/d6/Node.php @@ -186,7 +186,7 @@ public function fields() { * {@inheritdoc} */ public function prepareRow(Row $row) { - // format = 0 can happen when the body field is hidden. Set the format to 1 + // Format = 0 can happen when the body field is hidden. Set the format to 1 // to avoid migration map issues (since the body field isn't used anyway). if ($row->getSourceProperty('format') === '0') { $row->setSourceProperty('format', $this->filterDefaultFormat); diff --git a/core/modules/page_cache/src/StackMiddleware/PageCache.php b/core/modules/page_cache/src/StackMiddleware/PageCache.php index 07456a40976d..efe4e3b99c29 100644 --- a/core/modules/page_cache/src/StackMiddleware/PageCache.php +++ b/core/modules/page_cache/src/StackMiddleware/PageCache.php @@ -150,7 +150,7 @@ protected function lookup(Request $request, $type = self::MAIN_REQUEST, $catch = $if_none_match = $request->server->has('HTTP_IF_NONE_MATCH') ? stripslashes($request->server->get('HTTP_IF_NONE_MATCH')) : FALSE; if ($if_modified_since && $if_none_match - // etag must match. + // ETag must match. && $if_none_match == $response->getEtag() // if-modified-since must match. && $if_modified_since == $last_modified->getTimestamp()) { diff --git a/core/modules/path/tests/src/Functional/PathAliasTest.php b/core/modules/path/tests/src/Functional/PathAliasTest.php index 57f2c09a61a5..7cf034254edd 100644 --- a/core/modules/path/tests/src/Functional/PathAliasTest.php +++ b/core/modules/path/tests/src/Functional/PathAliasTest.php @@ -155,7 +155,7 @@ public function testAdminAlias(): void { // Set alias to second test node. $edit['path[0][value]'] = '/node/' . $node2->id(); - // leave $edit['alias'] the same + // Leave $edit['alias'] the same $this->drupalGet('admin/config/search/path/add'); $this->submitForm($edit, 'Save'); diff --git a/core/modules/path_alias/src/AliasWhitelist.php b/core/modules/path_alias/src/AliasWhitelist.php index 5aa22a4009da..40bf13af1465 100644 --- a/core/modules/path_alias/src/AliasWhitelist.php +++ b/core/modules/path_alias/src/AliasWhitelist.php @@ -82,7 +82,7 @@ protected function loadMenuPathRoots() { */ public function get($offset) { $this->lazyLoadCache(); - // this may be called with paths that are not represented by menu router + // This may be called with paths that are not represented by menu router // items such as paths that will be rewritten by hook_url_outbound_alter(). // Therefore internally TRUE is used to indicate whitelisted paths. FALSE is // used to indicate paths that have already been checked but are not diff --git a/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php b/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php index e720eafbfae7..ca47d2931ce8 100644 --- a/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php +++ b/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php @@ -28,7 +28,7 @@ public function testTableSortQuery(): void { ['field' => 'Task ID', 'sort' => 'asc', 'first' => 'eat', 'last' => 'perform at superbowl'], ['field' => 'Task', 'sort' => 'asc', 'first' => 'code', 'last' => 'sleep'], ['field' => 'Task', 'sort' => 'desc', 'first' => 'sleep', 'last' => 'code'], - // more elements here + // More elements here ]; @@ -56,7 +56,7 @@ public function testTableSortQueryFirst(): void { ['field' => 'Task ID', 'sort' => 'asc', 'first' => 'eat', 'last' => 'perform at superbowl'], ['field' => 'Task', 'sort' => 'asc', 'first' => 'code', 'last' => 'sleep'], ['field' => 'Task', 'sort' => 'desc', 'first' => 'sleep', 'last' => 'code'], - // more elements here + // More elements here ]; diff --git a/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php b/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php index 125cefe72474..21212a9371d5 100644 --- a/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php +++ b/core/modules/system/tests/src/Functional/FileTransfer/FileTransferTest.php @@ -70,7 +70,7 @@ public function _writeDirectory($base, $files = []) { $this->_writeDirectory($base . DIRECTORY_SEPARATOR . $key, $file); } else { - // just write the filename into the file + // Just write the filename into the file file_put_contents($base . DIRECTORY_SEPARATOR . $file, $file); } } diff --git a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php index 093504e218e8..5ce419d0e4da 100644 --- a/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php +++ b/core/modules/system/tests/src/Kernel/Migrate/d6/MigrateSystemConfigurationTest.php @@ -24,23 +24,23 @@ class MigrateSystemConfigurationTest extends MigrateDrupal6TestBase { 'requirements_warning' => 172800, 'requirements_error' => 1209600, ], - // logging is not handled by the migration. + // Logging is not handled by the migration. 'logging' => TRUE, ], 'system.date' => [ 'first_day' => 4, - // country is not handled by the migration. + // Country is not handled by the migration. 'country' => [ 'default' => NULL, ], - // timezone is not handled by the migration. + // Timezone is not handled by the migration. 'timezone' => [ 'default' => 'Europe/Paris', 'user' => [ 'configurable' => FALSE, - // default is not handled by the migration. + // Default is not handled by the migration. 'default' => 0, - // warn is not handled by the migration. + // Warn is not handled by the migration. 'warn' => FALSE, ], ], @@ -62,7 +62,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal6TestBase { 'error_level' => 'some', ], 'system.maintenance' => [ - // langcode is not handled by the migration. + // Langcode is not handled by the migration. 'langcode' => 'en', 'message' => 'Drupal is currently under maintenance. We should be back shortly. Thank you for your patience.', ], @@ -74,7 +74,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal6TestBase { ], 'css' => [ 'preprocess' => FALSE, - // gzip is not handled by the migration. + // Gzip is not handled by the migration. 'gzip' => TRUE, ], // fast_404 is not handled by the migration. @@ -86,7 +86,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal6TestBase { ], 'js' => [ 'preprocess' => FALSE, - // gzip is not handled by the migration. + // Gzip is not handled by the migration. 'gzip' => TRUE, ], ], @@ -96,9 +96,9 @@ class MigrateSystemConfigurationTest extends MigrateDrupal6TestBase { ], ], 'system.site' => [ - // langcode and default_langcode are not handled by the migration. + // Neither langcode nor default_langcode are not handled by the migration. 'langcode' => 'en', - // uuid is not handled by the migration. + // UUID is not handled by the migration. 'uuid' => '', 'name' => 'site_name', 'mail' => 'site_mail@example.com', diff --git a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php index cfc950e81bf0..eadbc007bcb2 100644 --- a/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php +++ b/core/modules/system/tests/src/Kernel/Migrate/d7/MigrateSystemConfigurationTest.php @@ -19,7 +19,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal7TestBase { 'system.authorize' => [], 'system.cron' => [ 'threshold' => [ - // autorun is not handled by the migration. + // Auto-run is not handled by the migration. // 'autorun' => 0, 'requirements_warning' => 172800, 'requirements_error' => 1209600, @@ -71,7 +71,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal7TestBase { ], ], 'system.maintenance' => [ - // langcode is not handled by the migration. + // Langcode is not handled by the migration. 'langcode' => 'en', 'message' => 'This is a custom maintenance mode message.', ], @@ -83,7 +83,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal7TestBase { ], 'css' => [ 'preprocess' => TRUE, - // gzip is not handled by the migration. + // Gzip is not handled by the migration. 'gzip' => TRUE, ], // fast_404 is not handled by the migration. @@ -95,7 +95,7 @@ class MigrateSystemConfigurationTest extends MigrateDrupal7TestBase { ], 'js' => [ 'preprocess' => FALSE, - // gzip is not handled by the migration. + // Gzip is not handled by the migration. 'gzip' => TRUE, ], ], @@ -105,9 +105,9 @@ class MigrateSystemConfigurationTest extends MigrateDrupal7TestBase { ], ], 'system.site' => [ - // langcode and default_langcode are not handled by the migration. + // Neither langcode nor default_langcode are not handled by the migration. 'langcode' => 'en', - // uuid is not handled by the migration. + // UUID is not handled by the migration. 'uuid' => '', 'name' => 'The Site Name', 'mail' => 'joseph@flattandsons.com', diff --git a/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php b/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php index 74fd7ab7b640..10b3e87072fb 100644 --- a/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php +++ b/core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepthModifier.php @@ -38,7 +38,7 @@ public function preQuery() { $argument = -10; } - // figure out which argument preceded us. + // Figure out which argument preceded us. $keys = array_reverse(array_keys($this->view->argument)); $skip = TRUE; foreach ($keys as $key) { diff --git a/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php b/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php index f1390862a410..6b6188a5efff 100644 --- a/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php +++ b/core/modules/taxonomy/src/Plugin/views/argument_default/Tid.php @@ -181,7 +181,7 @@ public function getArgument() { } if (!empty($this->options['limit'])) { $tids = []; - // filter by vocabulary + // Filter by vocabulary foreach ($taxonomy as $tid => $vocab) { if (!empty($this->options['vids'][$vocab])) { $tids[] = $tid; diff --git a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php index 77c79660904f..efb12a94f4f8 100644 --- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php +++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php @@ -372,7 +372,7 @@ public function validateExposed(&$form, FormStateInterface $form_state) { } protected function valueSubmit($form, FormStateInterface $form_state) { - // prevent array_filter from messing up our arrays in parent submit. + // Prevent array_filter from messing up our arrays in parent submit. } public function buildExposeForm(&$form, FormStateInterface $form_state) { @@ -388,7 +388,7 @@ public function buildExposeForm(&$form, FormStateInterface $form_state) { } public function adminSummary() { - // set up $this->valueOptions for the parent summary + // Set up $this->valueOptions for the parent summary $this->valueOptions = []; if ($this->value) { diff --git a/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php b/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php index 9ae0b996c445..fb697827742b 100644 --- a/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php +++ b/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php @@ -123,7 +123,7 @@ public function query() { $join = \Drupal::service('plugin.manager.views.join')->createInstance('standard', $def); - // use a short alias for this: + // Use a short alias for this: $alias = $def['table'] . '_' . $this->table; $this->alias = $this->query->addRelationship($alias, $join, 'taxonomy_term_field_data', $this->relationship); diff --git a/core/modules/taxonomy/src/TermViewsData.php b/core/modules/taxonomy/src/TermViewsData.php index d02ea66b8593..b997aecc3b3e 100644 --- a/core/modules/taxonomy/src/TermViewsData.php +++ b/core/modules/taxonomy/src/TermViewsData.php @@ -139,12 +139,12 @@ public function getViewsData() { $data['taxonomy_index']['table']['join'] = [ 'taxonomy_term_field_data' => [ - // links directly to taxonomy_term_field_data via tid + // Links directly to taxonomy_term_field_data via tid 'left_field' => 'tid', 'field' => 'tid', ], 'node_field_data' => [ - // links directly to node via nid + // Links directly to node via nid 'left_field' => 'nid', 'field' => 'nid', ], diff --git a/core/modules/user/src/Plugin/views/argument_validator/User.php b/core/modules/user/src/Plugin/views/argument_validator/User.php index ee714080ecc2..97f77a77c986 100644 --- a/core/modules/user/src/Plugin/views/argument_validator/User.php +++ b/core/modules/user/src/Plugin/views/argument_validator/User.php @@ -82,7 +82,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { * {@inheritdoc} */ public function submitOptionsForm(&$form, FormStateInterface $form_state, &$options = []) { - // filter trash out of the options so we don't store giant unnecessary arrays + // Filter trash out of the options so we don't store giant unnecessary arrays $options['roles'] = array_filter($options['roles']); } diff --git a/core/modules/user/src/Plugin/views/filter/Name.php b/core/modules/user/src/Plugin/views/filter/Name.php index 59bd34e14146..b2d8ff620c6f 100644 --- a/core/modules/user/src/Plugin/views/filter/Name.php +++ b/core/modules/user/src/Plugin/views/filter/Name.php @@ -99,7 +99,7 @@ public function validateExposed(&$form, FormStateInterface $form_state) { } protected function valueSubmit($form, FormStateInterface $form_state) { - // prevent array filter from removing our anonymous user. + // Prevent array filter from removing our anonymous user. } /** @@ -110,7 +110,7 @@ public function getValueOptions() { } public function adminSummary() { - // set up $this->valueOptions for the parent summary + // Set up $this->valueOptions for the parent summary $this->valueOptions = []; if ($this->value) { diff --git a/core/modules/user/tests/src/Kernel/UserValidationTest.php b/core/modules/user/tests/src/Kernel/UserValidationTest.php index 1b684747ba8e..256b641c116f 100644 --- a/core/modules/user/tests/src/Kernel/UserValidationTest.php +++ b/core/modules/user/tests/src/Kernel/UserValidationTest.php @@ -52,7 +52,7 @@ public function testUsernames(): void { 'Foo O\'Bar' => ['Valid username', 'assertNull'], 'foo@bar' => ['Valid username', 'assertNull'], 'foo@example.com' => ['Valid username', 'assertNull'], - // invalid domains are allowed in usernames. + // Invalid domains are allowed in usernames. 'foo@-example.com' => ['Valid username', 'assertNull'], 'þòøÇߪř€' => ['Valid username', 'assertNull'], // '+' symbol is allowed. diff --git a/core/modules/user/user.api.php b/core/modules/user/user.api.php index f4a05ae499f5..13fc647dc7c6 100644 --- a/core/modules/user/user.api.php +++ b/core/modules/user/user.api.php @@ -102,7 +102,7 @@ function hook_user_cancel_methods_alter(&$methods) { $methods['my_module_zero_out'] = [ 'title' => t('Delete the account and remove all content.'), 'description' => t('All your content will be replaced by empty strings.'), - // access should be used for administrative methods only. + // Access should be used for administrative methods only. 'access' => $account->hasPermission('access zero-out account cancellation method'), ]; } diff --git a/core/modules/views/src/ManyToOneHelper.php b/core/modules/views/src/ManyToOneHelper.php index 237afa64b435..b082a1d8ea01 100644 --- a/core/modules/views/src/ManyToOneHelper.php +++ b/core/modules/views/src/ManyToOneHelper.php @@ -137,7 +137,7 @@ public function summaryJoin() { $field = $this->handler->relationship . '_' . $this->handler->table . '.' . $this->handler->field; $join = $this->getJoin(); - // shortcuts + // Shortcuts $options = $this->handler->options; $view = $this->handler->view; $query = $this->handler->query; @@ -178,7 +178,7 @@ public function ensureMyTable() { $field = $this->handler->relationship . '_' . $this->handler->table . '.' . $this->handler->field; if ($this->handler->operator == 'or' && empty($this->handler->options['reduce_duplicates'])) { if (empty($this->handler->options['add_table']) && empty($this->handler->view->many_to_one_tables[$field])) { - // query optimization, INNER joins are slightly faster, so use them + // Query optimization, INNER joins are slightly faster, so use them // when we know we can. $join = $this->getJoin(); $group = $this->handler->options['group'] ?? FALSE; @@ -354,7 +354,7 @@ public function addFilter() { $clause->condition("$alias.$field", $value); } - // implode on either AND or OR. + // Implode on either AND or OR. $this->handler->query->addWhere($options['group'], $clause); } } diff --git a/core/modules/views/src/Plugin/views/HandlerBase.php b/core/modules/views/src/Plugin/views/HandlerBase.php index f8eabb0b722f..00f0e18def02 100644 --- a/core/modules/views/src/Plugin/views/HandlerBase.php +++ b/core/modules/views/src/Plugin/views/HandlerBase.php @@ -605,7 +605,7 @@ public function storeExposedInput($input, $status) { * {@inheritdoc} */ public function getJoin() { - // get the join from this table that links back to the base table. + // Get the join from this table that links back to the base table. // Determine the primary table to seek if (empty($this->query->relationships[$this->relationship])) { $base_table = $this->view->storage->get('base_table'); @@ -772,7 +772,7 @@ public static function breakString($str, $force_int = FALSE) { */ public function displayExposedForm($form, FormStateInterface $form_state) { $item = &$this->options; - // flip + // Flip $item['exposed'] = empty($item['exposed']); // If necessary, set new defaults: diff --git a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php index 8e95bff968b8..fc14e355c515 100644 --- a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php @@ -477,7 +477,7 @@ public function validateOptionsForm(&$form, FormStateInterface $form_state) { $plugin->validateOptionsForm($form['argument_default'][$default_id], $form_state, $option_values['argument_default'][$default_id]); } - // summary plugin + // Summary plugin $summary_id = $option_values['summary']['format']; $plugin = $this->getPlugin('style', $summary_id); if ($plugin) { @@ -510,7 +510,7 @@ public function submitOptionsForm(&$form, FormStateInterface $form_state) { $option_values['default_argument_options'] = $options; } - // summary plugin + // Summary plugin $summary_id = $option_values['summary']['format']; $plugin = $this->getPlugin('style', $summary_id); if ($plugin) { @@ -927,7 +927,7 @@ protected function summaryNameField() { // name field would be 'name' (i.e, the username). if (isset($this->name_table)) { - // if the alias is different then we're probably added, not ensured, + // If the alias is different then we're probably added, not ensured, // so look up the join and add it instead. if ($this->tableAlias != $this->name_table) { $j = HandlerBase::getTableJoin($this->name_table, $this->table); @@ -1131,7 +1131,7 @@ public function getValue() { if (!isset($arg) && $argument->hasDefaultArgument()) { $arg = $argument->getDefaultArgument(); - // remember that this argument was computed, not passed on the URL. + // Remember that this argument was computed, not passed on the URL. $this->is_default = TRUE; } // Set the argument, which will also validate that the argument can be set. @@ -1166,7 +1166,7 @@ public function getPlugin($type = 'argument_default', $name = NULL) { $name = $plugin_name; } - // we only fetch the options if we're fetching the plugin actually + // We only fetch the options if we're fetching the plugin actually // in use. if ($name == $plugin_name) { $options = $this->options[$options_name] ?? []; diff --git a/core/modules/views/src/Plugin/views/argument/DayDate.php b/core/modules/views/src/Plugin/views/argument/DayDate.php index 8cc441e2a958..e274c5a48183 100644 --- a/core/modules/views/src/Plugin/views/argument/DayDate.php +++ b/core/modules/views/src/Plugin/views/argument/DayDate.php @@ -27,7 +27,8 @@ class DayDate extends Date { */ public function summaryName($data) { $day = str_pad($data->{$this->name_alias}, 2, '0', STR_PAD_LEFT); - // strtotime respects server timezone, so we need to set the time fixed as utc time + // strtotime() respects server timezone, so we need to set the time fixed + // as utc time return $this->dateFormatter->format(strtotime("2005" . "05" . $day . " 00:00:00 UTC"), 'custom', $this->format, 'UTC'); } diff --git a/core/modules/views/src/Plugin/views/argument/ManyToOne.php b/core/modules/views/src/Plugin/views/argument/ManyToOne.php index be618bfd7744..4b6857747b8e 100644 --- a/core/modules/views/src/Plugin/views/argument/ManyToOne.php +++ b/core/modules/views/src/Plugin/views/argument/ManyToOne.php @@ -68,7 +68,7 @@ protected function defineOptions() { public function buildOptionsForm(&$form, FormStateInterface $form_state) { parent::buildOptionsForm($form, $form_state); - // allow + for or, , for and + // Allow '+' for "or". Allow ',' for "and". $form['break_phrase'] = [ '#type' => 'checkbox', '#title' => $this->t('Allow multiple values'), diff --git a/core/modules/views/src/Plugin/views/argument/NumericArgument.php b/core/modules/views/src/Plugin/views/argument/NumericArgument.php index 20d56ba1f32c..39bb662ec798 100644 --- a/core/modules/views/src/Plugin/views/argument/NumericArgument.php +++ b/core/modules/views/src/Plugin/views/argument/NumericArgument.php @@ -36,7 +36,7 @@ protected function defineOptions() { public function buildOptionsForm(&$form, FormStateInterface $form_state) { parent::buildOptionsForm($form, $form_state); - // allow + for or, , for and + // Allow '+' for "or". Allow ',' for "and". $form['break_phrase'] = [ '#type' => 'checkbox', '#title' => $this->t('Allow multiple values'), diff --git a/core/modules/views/src/Plugin/views/argument/StringArgument.php b/core/modules/views/src/Plugin/views/argument/StringArgument.php index 35b65acfe59e..15a68e0e608d 100644 --- a/core/modules/views/src/Plugin/views/argument/StringArgument.php +++ b/core/modules/views/src/Plugin/views/argument/StringArgument.php @@ -139,7 +139,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { ]; } - // allow + for or, , for and + // Allow '+' for "or". Allow ',' for "and". $form['break_phrase'] = [ '#type' => 'checkbox', '#title' => $this->t('Allow multiple values'), diff --git a/core/modules/views/src/Plugin/views/display/Page.php b/core/modules/views/src/Plugin/views/display/Page.php index 281ebdaa9e89..89b10ea08134 100644 --- a/core/modules/views/src/Plugin/views/display/Page.php +++ b/core/modules/views/src/Plugin/views/display/Page.php @@ -526,7 +526,7 @@ public function submitOptionsForm(&$form, FormStateInterface $form_state) { $menu = $form_state->getValue('menu'); [$menu['menu_name'], $menu['parent']] = explode(':', $menu['parent'], 2); $this->setOption('menu', $menu); - // send ajax form to options page if we use it. + // Send ajax form to options page if we use it. if ($form_state->getValue(['menu', 'type']) == 'default tab') { $form_state->get('view')->addFormToStack('display', $this->display['id'], 'tab_options'); } diff --git a/core/modules/views/src/Plugin/views/field/Counter.php b/core/modules/views/src/Plugin/views/field/Counter.php index 9293f93904cd..0925e5f7dc88 100644 --- a/core/modules/views/src/Plugin/views/field/Counter.php +++ b/core/modules/views/src/Plugin/views/field/Counter.php @@ -51,7 +51,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { * {@inheritdoc} */ public function query() { - // do nothing -- to override the parent query. + // Do nothing -- to override the parent query. } /** diff --git a/core/modules/views/src/Plugin/views/field/Custom.php b/core/modules/views/src/Plugin/views/field/Custom.php index 235ce233702f..29c840d2790c 100644 --- a/core/modules/views/src/Plugin/views/field/Custom.php +++ b/core/modules/views/src/Plugin/views/field/Custom.php @@ -27,7 +27,7 @@ public function usesGroupBy() { * {@inheritdoc} */ public function query() { - // do nothing -- to override the parent query. + // Do nothing -- to override the parent query. } /** diff --git a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php index f01a3b24d9e8..09ee61b40f4e 100644 --- a/core/modules/views/src/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/src/Plugin/views/field/FieldPluginBase.php @@ -185,7 +185,7 @@ public function query() { */ protected function addAdditionalFields($fields = NULL) { if (!isset($fields)) { - // notice check + // Notice check if (empty($this->additional_fields)) { return; } diff --git a/core/modules/views/src/Plugin/views/filter/Date.php b/core/modules/views/src/Plugin/views/filter/Date.php index 8d4b81d30683..84d776c4b64a 100644 --- a/core/modules/views/src/Plugin/views/filter/Date.php +++ b/core/modules/views/src/Plugin/views/filter/Date.php @@ -16,7 +16,7 @@ class Date extends NumericFilter { protected function defineOptions() { $options = parent::defineOptions(); - // value is already set up properly, we're just adding our new field to it. + // Value is already set up properly, we're just adding our new field to it. $options['value']['contains']['type']['default'] = 'date'; return $options; diff --git a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php index 284faa46f549..1a844105ca82 100644 --- a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php +++ b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php @@ -1567,7 +1567,7 @@ public function storeExposedInput($input, $status) { // know where to look for session stored values. $display_id = ($this->view->display_handler->isDefaulted('filters')) ? 'default' : $this->view->current_display; - // shortcut test. + // Shortcut test. $operator = !empty($this->options['expose']['use_operator']) && !empty($this->options['expose']['operator_id']); // False means that we got a setting that means to recurse ourselves, diff --git a/core/modules/views/src/Plugin/views/filter/InOperator.php b/core/modules/views/src/Plugin/views/filter/InOperator.php index fea8fdabd357..36089e05aec8 100644 --- a/core/modules/views/src/Plugin/views/filter/InOperator.php +++ b/core/modules/views/src/Plugin/views/filter/InOperator.php @@ -126,7 +126,7 @@ public function operators() { 'values' => 1, ], ]; - // if the definition allows for the empty operator, add it. + // If the definition allows for the empty operator, add it. if (!empty($this->definition['allow empty'])) { $operators += [ 'empty' => [ @@ -192,7 +192,7 @@ protected function valueForm(&$form, FormStateInterface $form_state) { $identifier = $this->options['expose']['identifier']; if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator_id'])) { - // exposed and locked. + // Exposed and locked. $which = in_array($this->operator, $this->operatorValues(1)) ? 'value' : 'none'; } else { diff --git a/core/modules/views/src/Plugin/views/filter/ManyToOne.php b/core/modules/views/src/Plugin/views/filter/ManyToOne.php index ba42ba788aef..f4049573b6ac 100644 --- a/core/modules/views/src/Plugin/views/filter/ManyToOne.php +++ b/core/modules/views/src/Plugin/views/filter/ManyToOne.php @@ -85,7 +85,7 @@ public function operators() { 'ensure_my_table' => 'helper', ], ]; - // if the definition allows for the empty operator, add it. + // If the definition allows for the empty operator, add it. if (!empty($this->definition['allow empty'])) { $operators += [ 'empty' => [ diff --git a/core/modules/views/src/Plugin/views/filter/NumericFilter.php b/core/modules/views/src/Plugin/views/filter/NumericFilter.php index 3dabc8a0ec1e..1acda0990412 100644 --- a/core/modules/views/src/Plugin/views/filter/NumericFilter.php +++ b/core/modules/views/src/Plugin/views/filter/NumericFilter.php @@ -156,7 +156,7 @@ public function operators() { ], ]; - // if the definition allows for the empty operator, add it. + // If the definition allows for the empty operator, add it. if (!empty($this->definition['allow empty'])) { $operators += [ 'empty' => [ @@ -219,7 +219,7 @@ protected function valueForm(&$form, FormStateInterface $form_state) { $identifier = $this->options['expose']['identifier']; if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator_id'])) { - // exposed and locked. + // Exposed and locked. $which = in_array($this->operator, $this->operatorValues(2)) ? 'minmax' : 'value'; } else { diff --git a/core/modules/views/src/Plugin/views/filter/StringFilter.php b/core/modules/views/src/Plugin/views/filter/StringFilter.php index 6269952258bd..f20bfee37615 100644 --- a/core/modules/views/src/Plugin/views/filter/StringFilter.php +++ b/core/modules/views/src/Plugin/views/filter/StringFilter.php @@ -186,7 +186,7 @@ public function operators() { 'values' => 1, ], ]; - // if the definition allows for the empty operator, add it. + // If the definition allows for the empty operator, add it. if (!empty($this->definition['allow empty'])) { $operators += [ 'empty' => [ @@ -265,7 +265,7 @@ protected function valueForm(&$form, FormStateInterface $form_state) { $identifier = $this->options['expose']['identifier']; if (empty($this->options['expose']['use_operator']) || empty($this->options['expose']['operator_id'])) { - // exposed and locked. + // Exposed and locked. $which = in_array($this->operator, $this->operatorValues(1)) ? 'value' : 'none'; } else { @@ -390,7 +390,7 @@ protected function opContainsWord($field) { return; } - // previously this was a call_user_func_array but that's unnecessary + // Previously this was a call_user_func_array but that's unnecessary // as views will unpack an array that is a single arg. $this->query->addWhere($this->options['group'], $where); } diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php index 0f424ea0c2c6..82ac19dd24e6 100644 --- a/core/modules/views/src/Plugin/views/query/Sql.php +++ b/core/modules/views/src/Plugin/views/query/Sql.php @@ -198,7 +198,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$ 'base' => $base_table, ]; - // init the table queue with our primary table. + // Initialize the table queue with our primary table. $this->tableQueue[$base_table] = [ 'alias' => $base_table, 'table' => $base_table, @@ -206,7 +206,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, ?array &$ 'join' => NULL, ]; - // init the tables with our primary table + // Init the tables with our primary table $this->tables[$base_table][$base_table] = [ 'count' => 1, 'alias' => $base_table, @@ -557,7 +557,7 @@ protected function markTable($table, $relationship, $alias) { if (!isset($alias)) { $alias = ''; if ($relationship != $this->view->storage->get('base_table')) { - // double underscore will help prevent accidental name + // Double underscore will help prevent accidental name // space collisions. $alias = $relationship . '__'; } @@ -596,7 +596,7 @@ protected function markTable($table, $relationship, $alias) { * cannot be ensured. */ public function ensureTable($table, $relationship = NULL, ?JoinPluginBase $join = NULL) { - // ensure a relationship + // Ensure a relationship if (empty($relationship)) { $relationship = $this->view->storage->get('base_table'); } @@ -646,7 +646,7 @@ public function ensureTable($table, $relationship = NULL, ?JoinPluginBase $join // example, a view that filters on 3 taxonomy terms using AND // needs to join taxonomy_term_data 3 times with the same join. - // scan through the table queue to see if a matching join and + // Scan through the table queue to see if a matching join and // relationship exists. If so, use it instead of this join. // @todo Scanning through $this->tableQueue results in an @@ -1402,7 +1402,7 @@ public function query($get_count = FALSE) { } if (!$this->getCountOptimized) { - // we only add the orderby if we're not counting. + // We only add the orderby if we're not counting. if ($this->orderby) { foreach ($this->orderby as $order) { if ($order['field'] == 'rand_') { diff --git a/core/modules/views/src/Plugin/views/query/SqliteDateSql.php b/core/modules/views/src/Plugin/views/query/SqliteDateSql.php index b93b29ae356f..8aab2b238b13 100644 --- a/core/modules/views/src/Plugin/views/query/SqliteDateSql.php +++ b/core/modules/views/src/Plugin/views/query/SqliteDateSql.php @@ -47,7 +47,7 @@ class SqliteDateSql implements DateSqlInterface { 'd' => '%d', // No format for full day name. 'l' => '%d', - // no format for day of month number without leading zeros. + // No format for day of month number without leading zeros. 'j' => '%d', 'W' => '%W', 'H' => '%H', diff --git a/core/modules/views/src/Plugin/views/relationship/EntityReverse.php b/core/modules/views/src/Plugin/views/relationship/EntityReverse.php index 73ea53d625b4..5f5f95d4b106 100644 --- a/core/modules/views/src/Plugin/views/relationship/EntityReverse.php +++ b/core/modules/views/src/Plugin/views/relationship/EntityReverse.php @@ -101,7 +101,7 @@ public function query() { $second_join = $this->joinManager->createInstance('standard', $second); $second_join->adjusted = TRUE; - // use a short alias for this: + // Use a short alias for this: $alias = $this->definition['field_name'] . '_' . $this->table; $this->alias = $this->query->addRelationship($alias, $second_join, $this->definition['base'], $this->relationship); diff --git a/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php b/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php index a3969b26f3a3..1347de51a7cc 100644 --- a/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php +++ b/core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php @@ -385,7 +385,7 @@ public function query() { } $join = Views::pluginManager('join')->createInstance($id, $def); - // use a short alias for this: + // Use a short alias for this: $alias = $def['table'] . '_' . $this->table; $this->alias = $this->query->addRelationship($alias, $join, $this->definition['base'], $this->relationship); diff --git a/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php b/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php index 18d1983a1574..5d117d1d3d91 100644 --- a/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php +++ b/core/modules/views/src/Plugin/views/relationship/RelationshipPluginBase.php @@ -159,7 +159,7 @@ public function query() { } $join = Views::pluginManager('join')->createInstance($id, $def); - // use a short alias for this: + // Use a short alias for this: $alias = $def['table'] . '_' . $this->table; $this->alias = $this->query->addRelationship($alias, $join, $this->definition['base'], $this->relationship); diff --git a/core/modules/views/src/Plugin/views/style/Table.php b/core/modules/views/src/Plugin/views/style/Table.php index 4eadd29daa48..62be3f85d478 100644 --- a/core/modules/views/src/Plugin/views/style/Table.php +++ b/core/modules/views/src/Plugin/views/style/Table.php @@ -104,7 +104,7 @@ public function buildSortPost() { $query = $this->view->getRequest()->query; $order = $query->get('order'); if (!isset($order)) { - // check for a 'default' clickSort. If there isn't one, exit gracefully. + // Check for a 'default' clickSort. If there isn't one, exit gracefully. if (empty($this->options['default'])) { return; } @@ -319,7 +319,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { '#return_value' => $field, '#parents' => ['style_options', 'default'], '#id' => $radio_id, - // because 'radio' doesn't fully support '#id' =( + // Because 'radio' doesn't fully support '#id' =( '#attributes' => ['id' => $radio_id], '#default_value' => $default, '#states' => [ @@ -382,7 +382,7 @@ public function buildOptionsForm(&$form, FormStateInterface $form_state) { ], ]; - // markup for the field name + // Markup for the field name $form['info'][$field]['name'] = [ '#markup' => $field_names[$field], ]; diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php index 24980bab6b9a..f37ec50fb3c5 100644 --- a/core/modules/views/src/ViewExecutable.php +++ b/core/modules/views/src/ViewExecutable.php @@ -744,7 +744,7 @@ public function getExposedInput() { $this->initDisplay(); $this->exposed_input = $this->request->query->all(); - // unset items that are definitely not our input: + // Unset items that are definitely not our input: foreach (['page', 'q'] as $key) { if (isset($this->exposed_input[$key])) { unset($this->exposed_input[$key]); @@ -1122,7 +1122,7 @@ protected function _buildArguments() { return TRUE; } - // build arguments. + // Build arguments. $position = -1; $substitutions = []; $status = TRUE; @@ -1147,11 +1147,11 @@ protected function _buildArguments() { if (isset($arg) || $argument->hasDefaultArgument()) { if (!isset($arg)) { $arg = $argument->getDefaultArgument(); - // make sure default args get put back. + // Make sure default args get put back. if (isset($arg)) { $this->args[$position] = $arg; } - // remember that this argument was computed, not passed on the URL. + // Remember that this argument was computed, not passed on the URL. $argument->is_default = TRUE; } @@ -1182,7 +1182,7 @@ protected function _buildArguments() { } } else { - // determine default condition and handle. + // Determine default condition and handle. $status = $argument->defaultAction(); break; } @@ -1191,7 +1191,7 @@ protected function _buildArguments() { unset($argument); } - // set the title in the build info. + // Set the title in the build info. if (!empty($title)) { $this->build_info['title'] = $title; } @@ -1226,7 +1226,7 @@ public function initQuery() { if (!empty($this->query)) { $class = get_class($this->query); if ($class && $class != 'stdClass') { - // return if query is already initialized. + // Return if query is already initialized. return TRUE; } } @@ -1347,7 +1347,7 @@ public function build($display_id = NULL) { if ($this->style_plugin->buildSort()) { $this->_build('sort'); } - // allow the plugin to build second sorts as well. + // Allow the plugin to build second sorts as well. $this->style_plugin->buildSortPost(); } @@ -1755,7 +1755,7 @@ public function preExecute($args = []) { * Unsets the current view, mostly. */ public function postExecute() { - // unset current view so we can be properly destructed later on. + // Unset current view so we can be properly destructed later on. // Return the previous value in case we're an attachment. if ($this->old_view) { diff --git a/core/modules/views/src/Views.php b/core/modules/views/src/Views.php index a7feae2c34b8..1d443d4093d7 100644 --- a/core/modules/views/src/Views.php +++ b/core/modules/views/src/Views.php @@ -432,7 +432,7 @@ public static function getHandlerTypes() { if (!isset(static::$handlerTypes)) { static::$handlerTypes = [ 'field' => [ - // title + // Title 'title' => static::t('Fields'), // Lowercase title for mid-sentence. 'ltitle' => static::t('fields'), diff --git a/core/modules/views/src/ViewsDataHelper.php b/core/modules/views/src/ViewsDataHelper.php index 9f561b7547fb..1ab9df96ad4f 100644 --- a/core/modules/views/src/ViewsDataHelper.php +++ b/core/modules/views/src/ViewsDataHelper.php @@ -69,7 +69,7 @@ public function fetchFields($base, $type, $grouping = FALSE, $sub_type = NULL) { foreach ($table_data as $field => $info) { // Collect table data from this table if ($field == 'table') { - // calculate what tables this table can join to. + // Calculate what tables this table can join to. if (!empty($info['join'])) { $bases = array_keys($info['join']); } diff --git a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php index 07da90822355..84eeb2419d3e 100644 --- a/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/DisplayTest.php @@ -171,7 +171,7 @@ public function testFilterGroupsOverriding(): void { $view = Views::getView('test_filter_groups'); $view->initDisplay(); - // mark is as overridden, yes FALSE, means overridden. + // Mark is as overridden, yes FALSE, means overridden. $view->displayHandlers->get('page')->setOverride('filter_groups', FALSE); $this->assertFalse($view->displayHandlers->get('page')->isDefaulted('filter_groups'), "Make sure that 'filter_groups' is marked as overridden."); $this->assertFalse($view->displayHandlers->get('page')->isDefaulted('filters'), "Make sure that 'filters'' is marked as overridden."); diff --git a/core/modules/views/tests/src/Functional/Plugin/PagerTest.php b/core/modules/views/tests/src/Functional/Plugin/PagerTest.php index 0db04b214345..a70146b1bef7 100644 --- a/core/modules/views/tests/src/Functional/Plugin/PagerTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/PagerTest.php @@ -165,7 +165,7 @@ public function testStorePagerSettings(): void { $this->submitForm($edit, 'Apply'); $this->assertSession()->pageTextContains('20 items'); - // add new display and test the settings again, by override it. + // Add new display and test the settings again, by override it. $edit = []; // Add a display and override the pager settings. $this->drupalGet('admin/structure/views/view/test_store_pager_settings/edit'); diff --git a/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php b/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php index 0017457e35a0..fd8008d48a48 100644 --- a/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php +++ b/core/modules/views/tests/src/Kernel/EventSubscriber/ViewsEntitySchemaSubscriberIntegrationTest.php @@ -329,7 +329,7 @@ public function testVariousTableUpdates(): void { // base <-> base + revision // base <-> base + translation + revision - // base <-> base + translation + // Base <-> base + translation $this->updateEntityTypeToTranslatable(TRUE); [$view, $display] = $this->getUpdatedViewAndDisplay(); @@ -346,7 +346,7 @@ public function testVariousTableUpdates(): void { $this->resetEntityType(); - // base + translation <-> base + translation + revision + // Base + translation <-> base + translation + revision $this->updateEntityTypeToTranslatable(TRUE); [$view, $display] = $this->getUpdatedViewAndDisplay(); @@ -370,7 +370,7 @@ public function testVariousTableUpdates(): void { $this->resetEntityType(); - // base + revision <-> base + translation + revision + // Base + revision <-> base + translation + revision $this->updateEntityTypeToRevisionable(); [$view, $display] = $this->getUpdatedViewAndDisplay(); @@ -394,7 +394,7 @@ public function testVariousTableUpdates(): void { $this->resetEntityType(); - // base <-> base + revision + // Base <-> base + revision $this->updateEntityTypeToRevisionable(TRUE); [$view, $display] = $this->getUpdatedViewAndDisplay(); @@ -411,7 +411,7 @@ public function testVariousTableUpdates(): void { $this->resetEntityType(); - // base <-> base + translation + revision + // Base <-> base + translation + revision $this->updateEntityTypeToRevisionable(TRUE); $this->updateEntityTypeToTranslatable(TRUE); [$view, $display] = $this->getUpdatedViewAndDisplay(); @@ -440,7 +440,7 @@ public function testVariousTableUpdates(): void { * Tests some possible entity table updates for a revision view. */ public function testVariousTableUpdatesForRevisionView(): void { - // base + revision <-> base + translation + revision + // Base + revision <-> base + translation + revision $this->updateEntityTypeToRevisionable(TRUE); [$view, $display] = $this->getUpdatedViewAndDisplay(TRUE); diff --git a/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php b/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php index 371224e0b1db..a05c1d923cc9 100644 --- a/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/AreaTextTest.php @@ -40,7 +40,7 @@ public function testAreaText(): void { $view = Views::getView('test_view'); $view->setDisplay(); - // add a text header + // Add a text header $string = $this->randomMachineName(); $view->displayHandlers->get('default')->overrideOption('header', [ 'area' => [ diff --git a/core/modules/views/tests/src/Kernel/Handler/ArgumentNullTest.php b/core/modules/views/tests/src/Kernel/Handler/ArgumentNullTest.php index 1a3e462fd068..8643ddcf0327 100644 --- a/core/modules/views/tests/src/Kernel/Handler/ArgumentNullTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/ArgumentNullTest.php @@ -47,7 +47,7 @@ public function testAreaText(): void { // Make sure that the argument is not validated yet. unset($view->argument['null']->argument_validated); $this->assertTrue($view->argument['null']->validateArgument(26)); - // test must_not_be option. + // Test must_not_be option. unset($view->argument['null']->argument_validated); $view->argument['null']->options['must_not_be'] = TRUE; $this->assertFalse($view->argument['null']->validateArgument(26), 'must_not_be returns FALSE, if there is an argument'); diff --git a/core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php b/core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php index 4f89977e5411..a60a3f13f50f 100644 --- a/core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php +++ b/core/modules/views/tests/src/Kernel/Handler/FieldBooleanTest.php @@ -66,7 +66,7 @@ public function testFieldBoolean(): void { $this->assertEquals('False', $view->field['age']->advancedRender($view->result[0])); $this->assertEquals('True', $view->field['age']->advancedRender($view->result[1])); - // test awesome unicode. + // Test awesome unicode. $view->field['age']->options['type'] = 'unicode-yes-no'; $this->assertEquals('✖', $view->field['age']->advancedRender($view->result[0])); $this->assertEquals('✔', $view->field['age']->advancedRender($view->result[1])); diff --git a/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php b/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php index 65c1475ce83b..4ed625afa8f5 100644 --- a/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php +++ b/core/modules/views/tests/src/Unit/Plugin/field/FieldPluginBaseTest.php @@ -367,7 +367,7 @@ public static function providerTestRenderAsLinkWithPathAndOptions() { // entity_type flag. $entity_type_id = 'node'; $data[] = ['test-path', ['entity_type' => $entity_type_id], '<a href="/test-path">value</a>']; - // prefix + // Prefix $data[] = ['test-path', ['prefix' => 'test_prefix'], 'test_prefix<a href="/test-path">value</a>']; // suffix. $data[] = ['test-path', ['suffix' => 'test_suffix'], '<a href="/test-path">value</a>test_suffix']; diff --git a/core/modules/views/views.api.php b/core/modules/views/views.api.php index 846c108c90f3..ab6f7f63b15a 100644 --- a/core/modules/views/views.api.php +++ b/core/modules/views/views.api.php @@ -191,7 +191,7 @@ function hook_views_data() { // ... FROM example_table et ... JOIN node_field_data nfd // ON et.nid = nfd.nid AND ('extra' clauses will be here) ... // @endcode - // although the table aliases will be different. + // (The table aliases will be different.) $data['example_table']['table']['join'] = [ // Within the 'join' section, list one or more tables to automatically // join to. In this example, every time 'node_field_data' is available in @@ -245,7 +245,7 @@ function hook_views_data() { // JOIN node_field_data nfd ON (definition of the join from the foo // module goes here) ... // @endcode - // although the table aliases will be different. + // Although the table aliases will be different. $data['example_table']['table']['join']['node_field_data'] = [ // 'node_field_data' above is the base we're joining to in Views. // 'left_table' is the table we're actually joining to, in order to get to diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index d63eaf523fca..a2c938e5e63f 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -98,7 +98,7 @@ function template_preprocess_views_view_fields(&$variables) { /** @var \Drupal\views\ResultRow $row */ $row = $variables['row']; foreach ($view->field as $id => $field) { - // render this even if set to exclude so it can be used elsewhere. + // Render this even if set to exclude so it can be used elsewhere. $field_output = $view->style_plugin->getField($row->index, $id); $empty = $field->isValueEmpty($field_output, $field->options['empty_zero']); if (empty($field->options['exclude']) && (!$empty || (empty($field->options['hide_empty']) && empty($variables['options']['hide_empty'])))) { diff --git a/core/modules/views_ui/src/Form/Ajax/ConfigHandler.php b/core/modules/views_ui/src/Form/Ajax/ConfigHandler.php index 8d6cadad4dde..e0ac4d9e92b8 100644 --- a/core/modules/views_ui/src/Form/Ajax/ConfigHandler.php +++ b/core/modules/views_ui/src/Form/Ajax/ConfigHandler.php @@ -94,13 +94,13 @@ public function buildForm(array $form, FormStateInterface $form_state, ?Request $relationship_options = []; foreach ($relationships as $relationship) { - // relationships can't link back to self. But also, due to ordering, + // Relationships can't link back to self. But also, due to ordering, // relationships can only link to prior relationships. if ($type == 'relationship' && $id == $relationship['id']) { break; } $relationship_handler = Views::handlerManager('relationship')->getHandler($relationship); - // ignore invalid/broken relationships. + // Ignore invalid/broken relationships. if (empty($relationship_handler)) { continue; } diff --git a/core/modules/views_ui/src/Form/Ajax/Rearrange.php b/core/modules/views_ui/src/Form/Ajax/Rearrange.php index 75d96b997cc9..52be994b2769 100644 --- a/core/modules/views_ui/src/Form/Ajax/Rearrange.php +++ b/core/modules/views_ui/src/Form/Ajax/Rearrange.php @@ -163,7 +163,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { // Make an array with the weights foreach ($form_state->getValue('fields') as $field => $info) { - // add each value that is a field with a weight to our list, but only if + // Add each value that is a field with a weight to our list, but only if // it has had its 'removed' checkbox checked. if (is_array($info) && isset($info['weight']) && empty($info['removed'])) { $order[$field] = $info['weight']; diff --git a/core/modules/views_ui/src/Form/Ajax/RearrangeFilter.php b/core/modules/views_ui/src/Form/Ajax/RearrangeFilter.php index c48f034254cd..3755e91dc248 100644 --- a/core/modules/views_ui/src/Form/Ajax/RearrangeFilter.php +++ b/core/modules/views_ui/src/Form/Ajax/RearrangeFilter.php @@ -244,7 +244,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { // Make an array with the weights foreach ($form_state->getValue('filters') as $field => $info) { - // add each value that is a field with a weight to our list, but only if + // Add each value that is a field with a weight to our list, but only if // it has had its 'removed' checkbox checked. if (is_array($info) && empty($info['removed'])) { if (isset($info['weight'])) { diff --git a/core/modules/views_ui/src/Form/Ajax/ViewsFormBase.php b/core/modules/views_ui/src/Form/Ajax/ViewsFormBase.php index 806a96d236dd..2ed4682f6861 100644 --- a/core/modules/views_ui/src/Form/Ajax/ViewsFormBase.php +++ b/core/modules/views_ui/src/Form/Ajax/ViewsFormBase.php @@ -98,7 +98,7 @@ public function getForm(ViewEntityInterface $view, $display_id, $js) { // being used. Html::resetSeenIds(); - // check to see if this is the top form of the stack. If it is, pop + // Check to see if this is the top form of the stack. If it is, pop // it off; if it isn't, the user clicked somewhere else and the stack is // now irrelevant. if (!empty($view->stack)) { @@ -150,7 +150,7 @@ public function getForm(ViewEntityInterface $view, $display_id, $js) { $response = $this->ajaxFormWrapper($form_class, $form_state); } elseif (!$form_state->get('ajax')) { - // if nothing on the stack, non-js forms just go back to the main view editor. + // If nothing on the stack, non-js forms just go back to the main view editor. $display_id = $form_state->get('display_id'); return new RedirectResponse(Url::fromRoute('entity.view.edit_display_form', ['view' => $view->id(), 'display_id' => $display_id], ['absolute' => TRUE])->toString()); } diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php index 2e427d250d7f..ef72a2c449d6 100644 --- a/core/modules/views_ui/src/ViewUI.php +++ b/core/modules/views_ui/src/ViewUI.php @@ -471,7 +471,7 @@ public function submitItemAdd($form, FormStateInterface $form_state) { } $id = $this->getExecutable()->addHandler($display_id, $type, $table, $field); - // check to see if we have group by settings + // Check to see if we have group by settings $key = $type; // Footer,header and empty text have a different internal handler type(area). if (isset($types[$type]['type'])) { @@ -486,7 +486,7 @@ public function submitItemAdd($form, FormStateInterface $form_state) { $this->addFormToStack('handler-group', $display_id, $type, $id); } - // check to see if this type has settings, if so add the settings form first + // Check to see if this type has settings, if so add the settings form first if ($handler && $handler->hasExtraOptions()) { $this->addFormToStack('handler-extra', $display_id, $type, $id); } diff --git a/core/modules/views_ui/views_ui.module b/core/modules/views_ui/views_ui.module index e13a08d24f82..f008218525d9 100644 --- a/core/modules/views_ui/views_ui.module +++ b/core/modules/views_ui/views_ui.module @@ -65,7 +65,7 @@ function views_ui_entity_type_build(array &$entity_types) { */ function views_ui_theme() { return [ - // edit a view + // Edit a view 'views_ui_display_tab_setting' => [ 'variables' => ['description' => '', 'link' => '', 'settings_links' => [], 'overridden' => FALSE, 'defaulted' => FALSE, 'description_separator' => TRUE, 'class' => []], 'file' => 'views_ui.theme.inc', diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index de57305b2b63..0c4784aac89d 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -79,7 +79,6 @@ <!-- Sniff for: NoSpaceBefore, SpacingBefore, WrongStyle --> <exclude name="Drupal.Commenting.InlineComment.DocBlock"/> <exclude name="Drupal.Commenting.InlineComment.InvalidEndChar"/> - <exclude name="Drupal.Commenting.InlineComment.NotCapital"/> <exclude name="Drupal.Commenting.InlineComment.SpacingAfter"/> </rule> <rule ref="Drupal.Commenting.InlineVariableComment"/> diff --git a/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php b/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php index 11774331a81f..14c46215ca31 100644 --- a/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php +++ b/core/tests/Drupal/BuildTests/Framework/BuildTestBase.php @@ -183,7 +183,7 @@ protected function tearDown(): void { ->directories() ->ignoreVCS(FALSE) ->ignoreDotFiles(FALSE) - // composer script is a symlink and fails chmod. Ignore it. + // Composer script is a symlink and fails chmod. Ignore it. ->notPath('/^vendor\/bin\/composer$/'); $fs->chmod($finder->getIterator(), 0775, 0000); $fs->remove($ws); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php index 53bfb56c2a77..04b1647a392e 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php @@ -733,7 +733,7 @@ protected function doTestLanguageChange($entity_type) { $controller = $this->entityTypeManager->getStorage($entity_type); $langcode = $this->langcodes[0]; - // check that field languages match entity language regardless of field + // Check that field languages match entity language regardless of field // translatability. $values = [ $langcode_key => $langcode, diff --git a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php index 384a7ffc5643..a1476deafb90 100644 --- a/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php +++ b/core/tests/Drupal/Tests/Core/Extension/ModuleHandlerTest.php @@ -513,7 +513,7 @@ public function testResetImplementations(): void { $this->cacheBackend ->expects($this->exactly(2)) ->method('set') - // reset sets module_implements to array() and getHookInfo later + // Reset sets module_implements to array() and getHookInfo later // populates hook_info. ->with($this->logicalOr('module_implements', 'hook_info')); $module_handler->resetImplementations(); diff --git a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php index 874ae1350db0..273eceb81b13 100644 --- a/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php +++ b/core/tests/Drupal/Tests/Core/Render/RendererPlaceholdersTest.php @@ -882,7 +882,7 @@ public function testNonScalarLazyBuilderCallbackContext(): void { 'int' => 1337, 'float' => 3.14, 'null' => NULL, - // array is not one of the scalar types. + // Array is not one of the scalar types. 'array' => ['hi!'], ], ]; diff --git a/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php b/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php index c747e896eee4..8c08126e746e 100644 --- a/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php +++ b/core/tests/Drupal/Tests/Core/Test/TestDiscoveryTest.php @@ -72,7 +72,7 @@ public static function infoParserProvider() { 'Drupal\FunctionalTests\BrowserTestBaseTest', ]; - // kernel PHPUnit test. + // Kernel PHPUnit test. $tests['phpunit-kernel'] = [ // Expected result. [ -- GitLab