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