diff --git a/core/modules/block/src/Tests/BlockLanguageTest.php b/core/modules/block/src/Tests/BlockLanguageTest.php index 901dd64..57ac06e 100644 --- a/core/modules/block/src/Tests/BlockLanguageTest.php +++ b/core/modules/block/src/Tests/BlockLanguageTest.php @@ -11,7 +11,7 @@ use Drupal\block\Entity\Block; /** - * Tests if a block can be configure to be only visible on a particular + * Tests if a block can be configured to be only visible on a particular * language. * * @group block diff --git a/core/modules/block_content/src/Tests/BlockContentSaveTest.php b/core/modules/block_content/src/Tests/BlockContentSaveTest.php index 74e296f..75c2801 100644 --- a/core/modules/block_content/src/Tests/BlockContentSaveTest.php +++ b/core/modules/block_content/src/Tests/BlockContentSaveTest.php @@ -78,8 +78,8 @@ public function testDeterminingChanges() { $block->save(); // The hook implementations block_content_test_block_content_presave() and - // block_content_test_block_content_update() determine changes and change the - // title as well as programmatically set the 'changed' timestamp. + // block_content_test_block_content_update() determine changes and change + // the title as well as programmatically set the 'changed' timestamp. $this->assertEqual($block->label(), 'updated_presave_update', 'Changes have been determined.'); $this->assertEqual($block->getChangedTime(), 979534800, 'Saving a custom block uses "changed" timestamp set in presave hook.'); diff --git a/core/modules/config/src/Tests/ConfigExportImportUITest.php b/core/modules/config/src/Tests/ConfigExportImportUITest.php index 4e8dc78..668b287 100644 --- a/core/modules/config/src/Tests/ConfigExportImportUITest.php +++ b/core/modules/config/src/Tests/ConfigExportImportUITest.php @@ -243,7 +243,7 @@ public function testExportImportCollections() { $this->assertEqual($data, array('foo' => 'baz'), 'The config_test.another_update in collection.test2 exists in the snapshot storage.'); $this->assertFalse($test2_snapshot->read('config_test.another_create'), 'The config_test.another_create in collection.test2 does not exist in the snapshot storage.'); - // Create the tar contains the expected content for the collections. + // Create the tar that contains the expected content for the collections. $tar = new ArchiveTar($filename, 'gz'); $content_list = $tar->listContent(); // Convert the list of files into something easy to search. diff --git a/core/modules/config/src/Tests/ConfigOverrideTest.php b/core/modules/config/src/Tests/ConfigOverrideTest.php index aa8a23f..c2061ca 100644 --- a/core/modules/config/src/Tests/ConfigOverrideTest.php +++ b/core/modules/config/src/Tests/ConfigOverrideTest.php @@ -111,7 +111,7 @@ function testConfOverride() { $this->assertFalse(isset($data['baz'])); $this->assertIdentical($data['404'], $expected_new_data['404']); - // Verify the overrides are still working. + // Verify that the overrides are still working. $config = \Drupal::config('config_test.system'); $this->assertIdentical($config->get('foo'), $overrides['config_test.system']['foo']); $this->assertIdentical($config->get('baz'), $overrides['config_test.system']['baz']); diff --git a/core/modules/content_translation/src/Tests/ContentTranslationWorkflowsTest.php b/core/modules/content_translation/src/Tests/ContentTranslationWorkflowsTest.php index c009e91..76470a7 100644 --- a/core/modules/content_translation/src/Tests/ContentTranslationWorkflowsTest.php +++ b/core/modules/content_translation/src/Tests/ContentTranslationWorkflowsTest.php @@ -83,7 +83,7 @@ function testWorkflows() { $expected_status = array('edit' => 200, 'overview' => 200, 'add_translation' => 200, 'edit_translation' => 200); $this->assertWorkflows($this->administrator, $expected_status); - // Check that translation permissions govern the associated operations. + // Check that translation permissions allow the associated operations. $ops = array('create' => t('Add'), 'update' => t('Edit'), 'delete' => t('Delete')); $translations_url = $this->entity->urlInfo('drupal:content-translation-overview'); foreach ($ops as $current_op => $item) { diff --git a/core/modules/field_ui/src/Tests/EntityDisplayTest.php b/core/modules/field_ui/src/Tests/EntityDisplayTest.php index b8799aa..05f2cc4 100644 --- a/core/modules/field_ui/src/Tests/EntityDisplayTest.php +++ b/core/modules/field_ui/src/Tests/EntityDisplayTest.php @@ -90,7 +90,7 @@ public function testEntityDisplayCRUD() { $display = entity_load('entity_view_display', $display->id()); $this->assertNULL($display->getComponent('component_3')); - // Check that CreateCopy() creates a new component that can be correctly + // Check that createCopy() creates a new component that can be correctly // saved. EntityViewMode::create(array('id' => $display->getTargetEntityTypeId() . '.other_view_mode', 'targetEntityType' => $display->getTargetEntityTypeId()))->save(); $new_display = $display->createCopy('other_view_mode'); diff --git a/core/modules/node/src/Tests/NodeRevisionPermissionsTest.php b/core/modules/node/src/Tests/NodeRevisionPermissionsTest.php index 07607f0..918ed61 100644 --- a/core/modules/node/src/Tests/NodeRevisionPermissionsTest.php +++ b/core/modules/node/src/Tests/NodeRevisionPermissionsTest.php @@ -133,7 +133,8 @@ function testNodeRevisionAccessPerType() { 'account' => $accounts, ); - // Test that the accounts have access to the corresponding page revision permissions. + // Test that the accounts have access to the corresponding page revision + // permissions. $revision = $this->node_revisions['page'][1]; $permutations = $this->generatePermutations($parameters); diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php index d2b2095..60d0fe7 100644 --- a/core/modules/simpletest/src/WebTestBase.php +++ b/core/modules/simpletest/src/WebTestBase.php @@ -302,8 +302,8 @@ protected function drupalCreateContentType(array $values = array()) { * * Entities postpone the composition of their renderable arrays to #pre_render * functions in order to maximize cache efficacy. This means that the full - * renderable array for an entity is constructed in drupal_render(). Some tests - * require the complete renderable array for an entity outside of the + * renderable array for an entity is constructed in drupal_render(). Some + * tests require the complete renderable array for an entity outside of the * drupal_render process in order to verify the presence of specific values. * This method isolates the steps in the render process that produce an * entity's renderable array. diff --git a/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php b/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php index 73cffc2..cc0d9df 100644 --- a/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php +++ b/core/modules/system/src/Tests/Cache/GenericCacheBackendUnitTestBase.php @@ -571,7 +571,7 @@ function testInvalidateTags() { Cache::invalidateTags(array('test_tag:2')); - // Test that cache entry has been invalidated in multiple bins. + // Test that the cache entry has been invalidated in multiple bins. foreach ($bins as $bin) { $this->assertFalse($this->getCacheBackend($bin)->get('test'), 'Tag invalidation affected item in bin.'); } diff --git a/core/modules/system/src/Tests/Common/MergeAttachmentsTest.php b/core/modules/system/src/Tests/Common/MergeAttachmentsTest.php index f84c3e4..141e376 100644 --- a/core/modules/system/src/Tests/Common/MergeAttachmentsTest.php +++ b/core/modules/system/src/Tests/Common/MergeAttachmentsTest.php @@ -19,7 +19,7 @@ class MergeAttachmentsTest extends KernelTestBase { /** - * Tests just library asset merging. + * Tests library asset merging. */ function testLibraryMerging() { $a['#attached'] = array( @@ -67,7 +67,7 @@ function testLibraryMerging() { } /** - * Tests just JavaScript and JavaScript setting asset merging. + * Tests JavaScript and JavaScript setting asset merging. */ function testJsSettingMerging() { $a['#attached'] = array( diff --git a/core/modules/system/src/Tests/Entity/EntityQueryAggregateTest.php b/core/modules/system/src/Tests/Entity/EntityQueryAggregateTest.php index 9f14873..a3262ea 100644 --- a/core/modules/system/src/Tests/Entity/EntityQueryAggregateTest.php +++ b/core/modules/system/src/Tests/Entity/EntityQueryAggregateTest.php @@ -526,7 +526,8 @@ public function testAggregation() { array('field_test_1' => 1, 'field_test_2_count' => 2), )); - // Groupby and aggregate by fieldapi field, and sort by the aggregated field. + // Groupby and aggregate by fieldapi field, and sort by the aggregated + // field. $this->queryResult = $this->factory->getAggregate('entity_test') ->groupBy('field_test_1') ->sortAggregate('field_test_2', 'COUNT', 'DESC') diff --git a/core/modules/system/src/Tests/ParamConverter/UpcastingTest.php b/core/modules/system/src/Tests/ParamConverter/UpcastingTest.php index 9faa604..1b27711 100644 --- a/core/modules/system/src/Tests/ParamConverter/UpcastingTest.php +++ b/core/modules/system/src/Tests/ParamConverter/UpcastingTest.php @@ -22,8 +22,8 @@ class UpcastingTest extends WebTestBase { /** * Confirms that all parameters are converted as expected. * - * All of these requests end up being processed by a controller with this - * the signature: f($user, $node, $foo) returning either values or labels + * All of these requests end up being processed by a controller with the + * signature: f($user, $node, $foo) returning either values or labels * like "user: Dries, node: First post, foo: bar" * * The tests shuffle the parameters around an checks if the right thing is diff --git a/core/modules/system/theme.api.php b/core/modules/system/theme.api.php index b319c2e..2d38382 100644 --- a/core/modules/system/theme.api.php +++ b/core/modules/system/theme.api.php @@ -35,12 +35,13 @@ * The theme system is invoked in drupal_render() by calling the internal * _theme() function, which operates on the concept of "theme hooks". Theme * hooks define how a particular type of data should be rendered. They are - * registered by modules by implementing hook_theme(), which specifies the name of - * the hook, the input "variables" used to provide data and options, and other - * information. Modules implementing hook_theme() also need to provide a default - * implementation for each of their theme hooks, normally in a Twig file, and - * they may also provide preprocessing functions. For example, the core Search - * module defines a theme hook for a search result item in search_theme(): + * registered by modules by implementing hook_theme(), which specifies the name + * of the hook, the input "variables" used to provide data and options, and + * other information. Modules implementing hook_theme() also need to provide a + * default implementation for each of their theme hooks, normally in a Twig + * file, and they may also provide preprocessing functions. For example, the + * core Search module defines a theme hook for a search result item in + * search_theme(): * @code * return array( * 'search_result' => array( diff --git a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php index d7e5135..e863101 100644 --- a/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument/ArgumentPluginBase.php @@ -651,7 +651,7 @@ public function defaultAction($info = NULL) { } /** - * How to act if validation fails + * How to act if validation fails. */ public function validateFail() { $info = $this->defaultActions($this->options['validate']['fail']); diff --git a/core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php b/core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php index c6405a9..7a6cf67 100644 --- a/core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php +++ b/core/modules/views/src/Plugin/views/argument_validator/ArgumentValidatorPluginBase.php @@ -102,7 +102,7 @@ public function validateArgument($arg) { return TRUE; } /** * Process the summary arguments for displaying. * - * Some plugins alter the argument so it uses something else internal. + * Some plugins alter the argument so it uses something else internally. * For example the user validation set's the argument to the uid, * for a faster query. But there are use cases where you want to use * the old value again, for example the summary. diff --git a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php index a6acce5..031a8e7 100644 --- a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php +++ b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php @@ -1302,7 +1302,7 @@ public function storeGroupInput($input, $status) { // know where to look for session stored values. $display_id = ($this->view->display_handler->isDefaulted('filters')) ? 'default' : $this->view->current_display; - // false means that we got a setting that means to recurse ourselves, + // False means that we got a setting that means to recurse ourselves, // so we should erase whatever happened to be there. if ($status === FALSE && isset($_SESSION['views'][$this->view->storage->id()][$display_id])) { $session = &$_SESSION['views'][$this->view->storage->id()][$display_id]; @@ -1394,7 +1394,7 @@ public function storeExposedInput($input, $status) { // 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, + // False means that we got a setting that means to recurse ourselves, // so we should erase whatever happened to be there. if (!$status && isset($_SESSION['views'][$this->view->storage->id()][$display_id])) { $session = &$_SESSION['views'][$this->view->storage->id()][$display_id]; diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php index ede6508..55a97cf 100644 --- a/core/modules/views/src/Plugin/views/query/Sql.php +++ b/core/modules/views/src/Plugin/views/query/Sql.php @@ -604,7 +604,7 @@ protected function ensurePath($table, $relationship = NULL, $join = NULL, $trace // Have we been this way? if (isset($traced[$join->leftTable])) { - // we looped. Broken. + // We looped. Broken. return FALSE; } diff --git a/core/modules/views/src/Plugin/views/style/StylePluginBase.php b/core/modules/views/src/Plugin/views/style/StylePluginBase.php index e6447ab..c07a5b8 100644 --- a/core/modules/views/src/Plugin/views/style/StylePluginBase.php +++ b/core/modules/views/src/Plugin/views/style/StylePluginBase.php @@ -611,7 +611,7 @@ public function renderGrouping($records, $groupings = array(), $group_rendered = ); } - // If this parameter isn't explicitly set modify the output to be fully + // If this parameter isn't explicitly set, modify the output to be fully // backward compatible to code before Views 7.x-3.0-rc2. // @TODO Remove this as soon as possible e.g. October 2020 if ($group_rendered === NULL) { diff --git a/core/modules/views/src/Tests/GlossaryTest.php b/core/modules/views/src/Tests/GlossaryTest.php index d932186..023bfc0 100644 --- a/core/modules/views/src/Tests/GlossaryTest.php +++ b/core/modules/views/src/Tests/GlossaryTest.php @@ -33,7 +33,7 @@ class GlossaryTest extends ViewTestBase { * Tests the default glossary view. */ public function testGlossaryView() { - // create a content type and add some nodes, with a non random title. + // Create a content type and add some nodes, with a non-random title. $type = $this->drupalCreateContentType(); $nodes_per_char = array( 'd' => 1, diff --git a/core/modules/views/src/Tests/Handler/FieldWebTest.php b/core/modules/views/src/Tests/Handler/FieldWebTest.php index c2da677..4efd4ef 100644 --- a/core/modules/views/src/Tests/Handler/FieldWebTest.php +++ b/core/modules/views/src/Tests/Handler/FieldWebTest.php @@ -295,7 +295,8 @@ public function testAlterUrl() { $this->assertSubString($output, UrlHelper::encodePath('Drupal Has A Great Community')); unset($id_field->options['alter']['path_case']); - // Tests the linkclass setting and see whether it actually exists in the output. + // Tests the linkclass setting and see whether it actually exists in the + // output. $id_field->options['alter']['link_class'] = $class = $this->randomMachineName(); $output = $id_field->theme($row); $elements = $this->xpathContent($output, '//a[contains(@class, :class)]', array(':class' => $class)); diff --git a/core/modules/views/src/Tests/Handler/HandlerAllTest.php b/core/modules/views/src/Tests/Handler/HandlerAllTest.php index 39f254c..c4c6497 100644 --- a/core/modules/views/src/Tests/Handler/HandlerAllTest.php +++ b/core/modules/views/src/Tests/Handler/HandlerAllTest.php @@ -93,7 +93,8 @@ public function testHandlers() { } } - // Go through each step individually to see whether some parts are failing. + // Go through each step individually to see whether some parts are + // failing. $view->build(); $view->preExecute(); $view->execute(); diff --git a/core/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php b/core/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php index 950f71b..ca3ee32 100644 --- a/core/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php +++ b/core/modules/views/tests/modules/views_test_data/src/Plugin/views/display/DisplayTest.php @@ -40,7 +40,8 @@ protected function getType() { } /** - * Overrides Drupal\views\Plugin\views\display\DisplayPluginBase::defineOptions(). + * Overrides + * Drupal\views\Plugin\views\display\DisplayPluginBase::defineOptions(). */ protected function defineOptions() { $options = parent::defineOptions(); diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index a96f14a..01e8ab7 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -109,8 +109,9 @@ function template_preprocess_views_view_fields(&$variables) { $field_output = $pre . '>' . $field_output . 'element_type . '>'; } - // Protect ourselves somewhat for backward compatibility. This will prevent - // old templates from producing invalid HTML when no element type is selected. + // Protect ourselves somewhat for backward compatibility. This will + // prevent old templates from producing invalid HTML when no element type + // is selected. if (empty($object->element_type)) { $object->element_type = 'span'; } diff --git a/core/modules/views_ui/css/views_ui.admin.theme.css b/core/modules/views_ui/css/views_ui.admin.theme.css index ed7d66f..656892d 100644 --- a/core/modules/views_ui/css/views_ui.admin.theme.css +++ b/core/modules/views_ui/css/views_ui.admin.theme.css @@ -745,7 +745,7 @@ td.group-title { /* @group Attachment bucket overridden * - * Applies a overridden(italics) font style to overridden buckets. + * Applies an overridden(italics) font style to overridden buckets. * The better way to implement this would be to add the overridden class * to the bucket header when the bucket is overridden and style it as a * generic icon classed element. For the moment, we'll style the bucket