- 🇮🇹Italy apaderno Brescia, 🇮🇹
The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command has been used, which arguments have been used, and which report that command shown.
- Status changed to Needs review
over 1 year ago 1:39pm 3 May 2023 - Status changed to Needs work
over 1 year ago 7:49pm 3 May 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
- if (empty($pecl_extension) || !class_exists($pecl_extension) || !in_array($pecl_extension, ['Memcache', 'Memcached'])) { + if (empty($pecl_extension) || !class_exists($pecl_extension) || !in_array($pecl_extension, [ + 'Memcache', + 'Memcached', + ])) {
Control structure conditions may exceed 80 characters, if they are simple to read and understand → . In this case, the code is more readable as it is.
$requirements['memcache_storage_cluster_' . $memcached_server]['title'] = t('Memcache Storage: %cluster cluster (%server)', - ['%server' => Html::escape($memcached_server), '%cluster' => Html::escape($cluster_name)]); + [ + '%server' => Html::escape($memcached_server), + '%cluster' => Html::escape($cluster_name), + ]);
Even in this case, the code is more readable as it is.
/** - * Constant definitions. + * @file + * Provides integration between Drupal and Memcached daemon. */
The short description for a module is Hook implementations for the [module name] module. where [module name] is indeed replaced by the module name (not its machine name).
+/** + * The MemcachedStatistics class. + * + * @package Drupal\memcache_storage + */ class MemcachedStatistics extends ControllerBase {
The class short description must not repeat the class name.
+ /** + * Builds the content. + * + * @return array + * Returns an array $build. + */ public function content() {
The return value description must not start with Returns (nor Return). It must not contain any variable name.
/** - * Class DrupalMemcache + * Class DrupalMemcache. * - * * Contains integration for Drupal & PECL Memcache extension. + * Contains integration for Drupal & PECL Memcache extension. * * @package Drupal\memcache_storage */
The short description must not contain the class name nor start with Class.
- 🇮🇳India Yashaswi18
Created a patch by addressing the above comments. Please review.
- 🇮🇳India Shank115
I tested the patch, it applies cleanly.
Checking patch README.txt... Checking patch css/memcache-storage.css... Checking patch memcache_storage.install... Checking patch memcache_storage.links.menu.yml... Checking patch memcache_storage.module... Checking patch src/Controller/MemcachedStatistics.php... Checking patch src/DrupalMemcache.php... Checking patch src/DrupalMemcached.php... Checking patch src/DrupalMemcachedBase.php... Checking patch src/DrupalMemcachedDebug.php... Checking patch src/DrupalMemcachedFactory.php... Checking patch src/DrupalMemcachedInterface.php... Checking patch src/DrupalMemcachedUtils.php... Checking patch src/MemcachedBackend.php... Checking patch src/MemcachedBackendFactory.php... Applied patch README.txt cleanly. Applied patch css/memcache-storage.css cleanly. Applied patch memcache_storage.install cleanly. Applied patch memcache_storage.links.menu.yml cleanly. Applied patch memcache_storage.module cleanly. Applied patch src/Controller/MemcachedStatistics.php cleanly. Applied patch src/DrupalMemcache.php cleanly. Applied patch src/DrupalMemcached.php cleanly. Applied patch src/DrupalMemcachedBase.php cleanly. Applied patch src/DrupalMemcachedDebug.php cleanly. Applied patch src/DrupalMemcachedFactory.php cleanly. Applied patch src/DrupalMemcachedInterface.php cleanly. Applied patch src/DrupalMemcachedUtils.php cleanly. Applied patch src/MemcachedBackend.php cleanly. Applied patch src/MemcachedBackendFactory.php cleanly.
- First commit to issue fork.
- Assigned to nitin_lama
- Issue was unassigned.
- Status changed to Needs review
8 months ago 12:26pm 14 March 2024 - First commit to issue fork.
- Status changed to Needs work
8 months ago 2:03pm 14 March 2024 - 🇮🇳India pray_12
Hi,
Remaining errors and warnings that need to be addressed are:FILE: /memcache_storage/memcache_storage.install --------------------------------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES --------------------------------------------------------------------------------------------------------------------------------------- 27 | ERROR | The array declaration extends to column 118 (the limit is 80). The array content should be split up over multiple lines 107 | ERROR | The array declaration extends to column 97 (the limit is 80). The array content should be split up over multiple lines --------------------------------------------------------------------------------------------------------------------------------------- FILE: /memcache_storage/memcache_storage.module ---------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES ---------------------------------------------------------------------------------------------------- 8 | WARNING | Global constants should not be used, move it to a class or interface 9 | WARNING | Global constants should not be used, move it to a class or interface ----------------------------------------------------------------------------------------------------