Unverified Commit b187a126 authored by alexpott's avatar alexpott

Issue #2937888 by dhruveshdtripathi, idebr, RoSk0, mohit1604, mfernea,...

Issue #2937888 by dhruveshdtripathi, idebr, RoSk0, mohit1604, mfernea, borisson_: Fix 'Drupal.Commenting.DocComment.LongNotCapital' coding standard
parent be6d515c
......@@ -2021,7 +2021,7 @@ function hook_queue_info_alter(&$queues) {
/**
* Alter an email message created with MailManagerInterface->mail().
*
* hook_mail_alter() allows modification of email messages created and sent
* Hook hook_mail_alter() allows modification of email messages created and sent
* with MailManagerInterface->mail(). Usage examples include adding and/or
* changing message text, message fields, and message headers.
*
......
......@@ -408,8 +408,8 @@ function drupal_set_time_limit($time_limit) {
/**
* Returns the base URL path (i.e., directory) of the Drupal installation.
*
* base_path() adds a "/" to the beginning and end of the returned path if the
* path is not empty. At the very least, this will return "/".
* Function base_path() adds a "/" to the beginning and end of the returned path
* if the path is not empty. At the very least, this will return "/".
*
* Examples:
* - http://example.com returns "/" because the path is empty.
......
......@@ -46,7 +46,7 @@ class DateTimePlus {
/**
* A RFC7231 Compliant date.
*
* http://tools.ietf.org/html/rfc7231#section-7.1.1.1
* @see http://tools.ietf.org/html/rfc7231#section-7.1.1.1
*
* Example: Sun, 06 Nov 1994 08:49:37 GMT
*/
......
......@@ -79,9 +79,10 @@ public static function getClass($class) {
/**
* Prepares a string for use as a CSS identifier (element, class, or ID name).
*
* http://www.w3.org/TR/CSS21/syndata.html#characters shows the syntax for
* valid CSS identifiers (including element names, classes, and IDs in
* selectors.)
* Link below shows the syntax for valid CSS identifiers (including element
* names, classes, and IDs in selectors).
*
* @see http://www.w3.org/TR/CSS21/syndata.html#characters
*
* @param string $identifier
* The identifier to clean.
......
......@@ -19,7 +19,7 @@ class UrlHelper {
/**
* Parses an array into a valid, rawurlencoded query string.
*
* rawurlencode() is RFC3986 compliant, and as a consequence RFC3987
* Function rawurlencode() is RFC3986 compliant, and as a consequence RFC3987
* compliant. The latter defines the required format of "URLs" in HTML5.
* urlencode() is almost the same as rawurlencode(), except that it encodes
* spaces as "+" instead of "%20". This makes its result non compliant to
......
......@@ -426,9 +426,9 @@ public function andIf(AccessResultInterface $other) {
/**
* Inherits the cacheability of the other access result, if any.
*
* inheritCacheability() differs from addCacheableDependency() in how it
* handles max-age, because it is designed to inherit the cacheability of the
* second operand in the andIf() and orIf() operations. There, the situation
* This method differs from addCacheableDependency() in how it handles
* max-age, because it is designed to inherit the cacheability of the second
* operand in the andIf() and orIf() operations. There, the situation
* "allowed, max-age=0 OR allowed, max-age=1000" needs to yield max-age 1000
* as the end result.
*
......
......@@ -19,7 +19,7 @@ class LibraryDiscovery implements LibraryDiscoveryInterface {
/**
* The final library definitions, statically cached.
*
* hook_library_info_alter() and hook_js_settings_alter() allows modules
* Hooks hook_library_info_alter() and hook_js_settings_alter() allow modules
* and themes to dynamically alter a library definition (once per request).
*
* @var array
......
......@@ -9,8 +9,8 @@
/**
* Adds the twig_extension_hash parameter to the container.
*
* twig_extension_hash is a hash of all extension mtimes for Twig template
* invalidation.
* Parameter twig_extension_hash is a hash of all extension mtimes for Twig
* template invalidation.
*/
class TwigExtensionPass implements CompilerPassInterface {
......
......@@ -479,7 +479,7 @@ function hook_install_tasks_alter(&$tasks, $install_state) {
/**
* Perform a single update between minor versions.
*
* hook_update_N() can only be used to update between minor versions of a
* Hook hook_update_N() can only be used to update between minor versions of a
* module. To upgrade between major versions of Drupal (for example, between
* Drupal 7 and 8), use the @link migrate Migrate API @endlink instead.
*
......
......@@ -609,13 +609,13 @@ public function setRequestMethod($method) {
/**
* Checks whether the request method is a "safe" HTTP method.
*
* http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1.1 defines
* GET and HEAD as "safe" methods, meaning they SHOULD NOT have side-effects,
* such as persisting $form_state changes.
* Link below defines GET and HEAD as "safe" methods, meaning they SHOULD NOT
* have side-effects, such as persisting $form_state changes.
*
* @return bool
*
* @see \Symfony\Component\HttpFoundation\Request::isMethodSafe()
* @see http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.1.1
*/
protected function isRequestMethodSafe() {
return in_array($this->requestMethod, ['GET', 'HEAD']);
......
......@@ -384,8 +384,8 @@ protected function processHtmlHead(array $html_head) {
/**
* Transform a html_head_link array into html_head and http_header arrays.
*
* html_head_link is a special case of html_head which can be present as
* a link item in the HTML head section, and also as a Link: HTTP header,
* Variable html_head_link is a special case of html_head which can be present
* as a link item in the HTML head section, and also as a Link: HTTP header,
* depending on options in the render array. Processing it can add to both the
* html_head and http_header sections.
*
......
......@@ -27,8 +27,8 @@ public function __construct(RequestStack $request_stack) {
/**
* {@inheritdoc}
*
* generate(), generateFromRoute(), and getPathFromRoute() all call this
* protected method.
* Methods generate(), generateFromRoute() and getPathFromRoute() all call
* this protected method.
*/
protected function getRoute($name) {
if ($name === '<front>') {
......
......@@ -115,7 +115,7 @@ protected function handleRaw(Request $request) {
/**
* Boots up the session.
*
* bootSession() + shutdownSession() basically simulates what
* This method + shutdownSession() basically simulates what
* \Drupal\Core\StackMiddleware\Session does.
*
* @param \Symfony\Component\HttpFoundation\Request $request
......
......@@ -18,7 +18,7 @@ class TranslationTest extends FieldKernelTestBase {
/**
* Modules to enable.
*
* node is required because the tests alter the node entity type.
* The node module is required because the tests alter the node entity type.
*
* @var array
*/
......
......@@ -246,9 +246,9 @@ public function testFilterFormatAPI() {
/**
* Tests the 'processed_text' element.
*
* check_markup() is a wrapper for the 'processed_text' element, for use in
* simple scenarios; the 'processed_text' element has more advanced features:
* it lets filters attach assets, associate cache tags and define
* Function check_markup() is a wrapper for the 'processed_text' element, for
* use in simple scenarios; the 'processed_text' element has more advanced
* features: it lets filters attach assets, associate cache tags and define
* #lazy_builder callbacks.
* This test focuses solely on those advanced features.
*/
......
......@@ -10,11 +10,12 @@
/**
* TODO: Test the following functions.
*
* image.effects.inc:
* In file:
* - image.effects.inc:
* image_style_generate()
* \Drupal\image\ImageStyleInterface::createDerivative()
*
* image.module:
* - image.module:
* image_style_options()
* \Drupal\image\ImageStyleInterface::flush()
* image_filter_keyword()
......
......@@ -286,9 +286,9 @@ public function testImageDimensions() {
/**
* Render an image style element.
*
* drupal_render() alters the passed $variables array by adding a new key
* '#printed' => TRUE. This prevents next call to re-render the element. We
* wrap drupal_render() in a helper protected method and pass each time a
* Function drupal_render() alters the passed $variables array by adding a new
* key '#printed' => TRUE. This prevents next call to re-render the element.
* We wrap drupal_render() in a helper protected method and pass each time a
* fresh array so that $variables won't get altered and the element is
* re-rendered each time.
*/
......
......@@ -8,11 +8,12 @@
/**
* TODO: Test the following functions.
*
* image.effects.inc:
* In file:
* - image.effects.inc:
* image_style_generate()
* \Drupal\image\ImageStyleInterface::createDerivative()
*
* image.module:
* - image.module:
* image_style_options()
* \Drupal\image\ImageStyleInterface::flush()
* image_filter_keyword()
......
......@@ -267,8 +267,8 @@ protected function getExpectedCacheContexts() {
/**
* Tests POSTing a comment without critical base fields.
*
* testPost() is testing with the most minimal normalization possible: the one
* returned by ::getNormalizedPostEntity().
* Tests with the most minimal normalization possible: the one returned by
* ::getNormalizedPostEntity().
*
* But Comment entities have some very special edge cases:
* - base fields that are not marked as required in
......
......@@ -123,9 +123,9 @@ public function testNoTokenizer() {
/**
* Like PHP chr() function, but for unicode characters.
*
* chr() only works for ASCII characters up to character 255. This function
* converts a number to the corresponding unicode character. Adapted from
* functions supplied in comments on several functions on php.net.
* Function chr() only works for ASCII characters up to character 255. This
* function converts a number to the corresponding unicode character. Adapted
* from functions supplied in comments on several functions on php.net.
*/
public function code2utf($num) {
if ($num < 128) {
......
......@@ -154,7 +154,7 @@ public function testSuggestionsAlterInclude() {
/**
* Tests execution order of theme suggestion alter hooks.
*
* hook_theme_suggestions_alter() should fire before
* Hook hook_theme_suggestions_alter() should fire before
* hook_theme_suggestions_HOOK_alter() within an extension (module or theme).
*/
public function testExecutionOrder() {
......
......@@ -8,8 +8,8 @@
/**
* Implements hook_cron().
*
* common_test_cron() throws an exception, but the execution should reach this
* function as well.
* Function common_test_cron() throws an exception, but the execution should
* reach this function as well.
*
* @see common_test_cron()
*/
......
......@@ -42,8 +42,7 @@
<rule ref="Drupal.Commenting.DocComment">
<!-- Sniff for these errors: SpacingAfterTagGroup, WrongEnd, SpacingBetween,
ContentAfterOpen, SpacingBeforeShort, TagValueIndent, ShortStartSpace,
SpacingAfter -->
<exclude name="Drupal.Commenting.DocComment.LongNotCapital"/>
SpacingAfter, LongNotCapital -->
<!-- ParamNotFirst still not decided for PHPUnit-based tests.
@see https://www.drupal.org/node/2253915 -->
<exclude name="Drupal.Commenting.DocComment.ParamNotFirst"/>
......
......@@ -31,7 +31,7 @@
/**
* The drupalSettings value from the current raw $content.
*
* drupalSettings refers to the drupalSettings JavaScript variable.
* Variable drupalSettings refers to the drupalSettings JavaScript variable.
*
* @var array
*/
......@@ -99,7 +99,7 @@ protected function removeWhiteSpace() {
/**
* Gets the value of drupalSettings for the currently-loaded page.
*
* drupalSettings refers to the drupalSettings JavaScript variable.
* Variable drupalSettings refers to the drupalSettings JavaScript variable.
*/
protected function getDrupalSettings() {
return $this->drupalSettings;
......@@ -108,7 +108,7 @@ protected function getDrupalSettings() {
/**
* Sets the value of drupalSettings for the currently-loaded page.
*
* drupalSettings refers to the drupalSettings JavaScript variable.
* Variable drupalSettings refers to the drupalSettings JavaScript variable.
*/
protected function setDrupalSettings($settings) {
$this->drupalSettings = $settings;
......
......@@ -9,7 +9,7 @@
/**
* Tests #attached assets: attached asset libraries and JavaScript settings.
*
* i.e. tests:
* I.e. tests:
*
* @code
* $build['#attached']['library'] = …
......
......@@ -57,7 +57,7 @@ protected function setUp() {
/**
* Checks the order of CRUD hook execution messages.
*
* entity_crud_hook_test.module implements all core entity CRUD hooks and
* Module entity_crud_hook_test implements all core entity CRUD hooks and
* stores a message for each in $GLOBALS['entity_crud_hook_test'].
*
* @param $messages
......
......@@ -65,8 +65,8 @@ protected function setUp() {
/**
* Returns the module name and the module directory for the plugin.
*
* drupal_get_path() cannot be used here, because it is not available in
* Drupal PHPUnit tests.
* Function drupal_get_path() cannot be used here, because it is not available
* in Drupal PHPUnit tests.
*
* @return array
* A one-dimensional array containing the following strings:
......
......@@ -35,7 +35,7 @@ protected function setUp() {
/**
* Provides the two classes of placeholders: cacheable and uncacheable.
*
* i.e. with or without #cache[keys].
* I.e. with or without #cache[keys].
*
* Also, different types:
* - A) automatically generated placeholder
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment