Fix the issues reported by phpcs

Created on 28 July 2020, over 4 years ago
Updated 14 August 2024, 3 months ago

Running phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml shows the following warnings/errors, which should be fixed.

FILE: ./src/Form/VisualizationSettingsForm.php
----------------------------------------------------------------------
FOUND 13 ERRORS AND 2 WARNINGS AFFECTING 14 LINES
----------------------------------------------------------------------
  1 | ERROR   | [x] The PHP open tag must be followed by exactly one
    |         |     blank line
  5 | ERROR   | [x] Use statements should be sorted alphabetically.
    |         |     The first wrong one is
    |         |     Drupal\Core\Config\ConfigFactory.
 10 | ERROR   | [x] Missing class doc comment
 21 | ERROR   | [x] Missing function doc comment
 26 | ERROR   | [x] Missing function doc comment
 26 | ERROR   | [ ] Public method name
    |         |     "VisualizationSettingsForm::getFormID" is not in
    |         |     lowerCamel format
 37 | ERROR   | [x] Missing function doc comment
 38 | ERROR   | [x] Short array syntax must be used to define arrays
 46 | ERROR   | [x] Short array syntax must be used to define arrays
 48 | WARNING | [ ] t() calls should be avoided in classes, use
    |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
    |         |     and $this->t() instead
 50 | WARNING | [ ] t() calls should be avoided in classes, use
    |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
    |         |     and $this->t() instead
 57 | ERROR   | [x] Missing function doc comment
 63 | ERROR   | [x] Expected 1 blank line after function; 0 found
 64 | ERROR   | [x] The closing brace for the class must have an
    |         |     empty line before it
 65 | ERROR   | [x] A closing tag is not permitted at the end of a
    |         |     PHP file
----------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./src/Plugin/VisualizationHandlerManager.php
----------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 6 LINES
----------------------------------------------------------------------
  3 | ERROR | [x] Namespaced classes, interfaces and traits should
    |       |     not begin with a file doc comment
  5 | ERROR | [x] Doc comment short description must end with a full
    |       |     stop
 11 | ERROR | [x] Use statements should be sorted alphabetically. The
    |       |     first wrong one is
    |       |     Drupal\Component\Plugin\Discovery\DerivativeDiscoveryDecorator.
 27 | ERROR | [x] Parameter comment must end with a full stop
 33 | ERROR | [x] Expected 1 blank line after function; 0 found
 34 | ERROR | [x] The closing brace for the class must have an empty
    |       |     line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./src/Plugin/views/style/Visualization.php
----------------------------------------------------------------------
FOUND 31 ERRORS AND 15 WARNINGS AFFECTING 44 LINES
----------------------------------------------------------------------
   1 | ERROR   | [x] The PHP open tag must be followed by exactly one
     |         |     blank line
   2 | ERROR   | [x] Namespaced classes, interfaces and traits should
     |         |     not begin with a file doc comment
  10 | ERROR   | [x] Use statements should be sorted alphabetically.
     |         |     The first wrong one is
     |         |     Drupal\Core\Form\FormStateInterface.
  13 | ERROR   | [x] The open comment tag must be the only content on
     |         |     the line
  13 | ERROR   | [x] Doc comment short description must be on the
     |         |     first line
  25 | ERROR   | [x] There must be exactly one newline after the
     |         |     class comment
  66 | ERROR   | [x] Short array syntax must be used to define arrays
  67 | ERROR   | [x] Short array syntax must be used to define arrays
  67 | ERROR   | [x] Short array syntax must be used to define arrays
  69 | ERROR   | [x] Short array syntax must be used to define arrays
  70 | ERROR   | [x] Short array syntax must be used to define arrays
  71 | ERROR   | [x] Short array syntax must be used to define arrays
  84 | ERROR   | [x] Short array syntax must be used to define arrays
  86 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
  87 | ERROR   | [x] Short array syntax must be used to define arrays
  88 | WARNING | [ ] #options values usually have to run through t()
     |         |     for translation
  89 | WARNING | [ ] #options values usually have to run through t()
     |         |     for translation
  90 | WARNING | [ ] #options values usually have to run through t()
     |         |     for translation
  91 | WARNING | [ ] #options values usually have to run through t()
     |         |     for translation
  97 | ERROR   | [x] Short array syntax must be used to define arrays
  99 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 107 | ERROR   | [x] Short array syntax must be used to define arrays
 114 | ERROR   | [x] Short array syntax must be used to define arrays
 116 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 118 | ERROR   | [x] Short array syntax must be used to define arrays
 122 | ERROR   | [x] Short array syntax must be used to define arrays
 124 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 125 | ERROR   | [x] Short array syntax must be used to define arrays
 126 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 127 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 135 | ERROR   | [x] Short array syntax must be used to define arrays
 137 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 142 | ERROR   | [x] Short array syntax must be used to define arrays
 144 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 150 | ERROR   | [x] Short array syntax must be used to define arrays
 152 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 156 | ERROR   | [x] Short array syntax must be used to define arrays
 158 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 163 | ERROR   | [x] Short array syntax must be used to define arrays
 165 | WARNING | [ ] t() calls should be avoided in classes, use
     |         |     \Drupal\Core\StringTranslation\StringTranslationTrait
     |         |     and $this->t() instead
 173 | ERROR   | [ ] Public method name "Visualization::build_sort"
     |         |     is not in lowerCamel format
 185 | ERROR   | [ ] Missing short description in doc comment
 187 | ERROR   | [ ] Description for the @return value is missing
 189 | ERROR   | [ ] Public method name
     |         |     "Visualization::get_render_fields" is not in
     |         |     lowerCamel format
 191 | ERROR   | [x] Expected 1 blank line after function; 0 found
 192 | ERROR   | [x] The closing brace for the class must have an
     |         |     empty line before it
----------------------------------------------------------------------
PHPCBF CAN FIX THE 27 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./src/Plugin/visualization/handler/GoogleVisualizationAPIHandler.php
----------------------------------------------------------------------
FOUND 14 ERRORS AND 3 WARNINGS AFFECTING 16 LINES
----------------------------------------------------------------------
   1 | ERROR   | [x] The PHP open tag must be followed by exactly one
     |         |     blank line
   2 | ERROR   | [x] Namespaced classes, interfaces and traits should
     |         |     not begin with a file doc comment
  10 | WARNING | [x] Unused use statement
  10 | ERROR   | [x] Use statements should be sorted alphabetically.
     |         |     The first wrong one is
     |         |     Drupal\Component\Annotation\Plugin.
  11 | WARNING | [x] Unused use statement
  12 | ERROR   | [x] There must be one blank line after the last USE
     |         |     statement; 0 found;
  15 | ERROR   | [ ] Doc comment short description must be on a
     |         |     single line, further text should be a separate
     |         |     paragraph
  25 | ERROR   | [ ] Missing member variable doc comment
  27 | ERROR   | [ ] Missing member variable doc comment
  34 | ERROR   | [x] Short array syntax must be used to define arrays
  47 | ERROR   | [x] Short array syntax must be used to define arrays
  50 | ERROR   | [x] Short array syntax must be used to define arrays
  66 | ERROR   | [x] Short array syntax must be used to define arrays
  83 | ERROR   | [x] Short array syntax must be used to define arrays
  93 | ERROR   | [x] Expected 1 space before "=>"; 0 found
  95 | WARNING | [x] A comma should follow the last multiline array
     |         |     item. Found: ]
 124 | ERROR   | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./src/Plugin/visualization/handler/HighchartsHandler.php
----------------------------------------------------------------------
FOUND 32 ERRORS AND 2 WARNINGS AFFECTING 28 LINES
----------------------------------------------------------------------
   1 | ERROR   | [x] The PHP open tag must be followed by exactly one
     |         |     blank line
   2 | ERROR   | [x] Namespaced classes, interfaces and traits should
     |         |     not begin with a file doc comment
  10 | WARNING | [x] Unused use statement
  10 | ERROR   | [x] Use statements should be sorted alphabetically.
     |         |     The first wrong one is
     |         |     Drupal\Component\Annotation\Plugin.
  11 | WARNING | [x] Unused use statement
  12 | ERROR   | [x] There must be one blank line after the last USE
     |         |     statement; 0 found;
  24 | ERROR   | [ ] Missing member variable doc comment
  26 | ERROR   | [ ] Missing member variable doc comment
  27 | ERROR   | [ ] Missing member variable doc comment
  49 | ERROR   | [x] Short array syntax must be used to define arrays
  59 | ERROR   | [x] Short array syntax must be used to define arrays
  67 | ERROR   | [x] Short array syntax must be used to define arrays
  73 | ERROR   | [x] Short array syntax must be used to define arrays
  74 | ERROR   | [x] Short array syntax must be used to define arrays
  81 | ERROR   | [x] Short array syntax must be used to define arrays
  88 | ERROR   | [x] Short array syntax must be used to define arrays
  93 | ERROR   | [ ] The array declaration extends to column 143 (the
     |         |     limit is 80). The array content should be split
     |         |     up over multiple lines
  93 | ERROR   | [x] Short array syntax must be used to define arrays
 105 | ERROR   | [x] Short array syntax must be used to define arrays
 108 | ERROR   | [x] Short array syntax must be used to define arrays
 113 | ERROR   | [x] Short array syntax must be used to define arrays
 114 | ERROR   | [x] Short array syntax must be used to define arrays
 125 | ERROR   | [x] Short array syntax must be used to define arrays
 131 | ERROR   | [x] Short array syntax must be used to define arrays
 133 | ERROR   | [x] Short array syntax must be used to define arrays
 133 | ERROR   | [x] There must be no space between the "array"
     |         |     keyword and the opening parenthesis
 133 | ERROR   | [x] Short array syntax must be used to define arrays
 147 | ERROR   | [x] Short array syntax must be used to define arrays
 148 | ERROR   | [x] Short array syntax must be used to define arrays
 149 | ERROR   | [ ] The array declaration extends to column 131 (the
     |         |     limit is 80). The array content should be split
     |         |     up over multiple lines
 149 | ERROR   | [x] Short array syntax must be used to define arrays
 150 | ERROR   | [ ] The array declaration extends to column 128 (the
     |         |     limit is 80). The array content should be split
     |         |     up over multiple lines
 150 | ERROR   | [x] Short array syntax must be used to define arrays
 170 | ERROR   | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 28 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./src/VisualizationHandlerInterface.php
----------------------------------------------------------------------
FOUND 28 ERRORS AFFECTING 18 LINES
----------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one
    |       |     blank line
  2 | ERROR | [x] Namespaced classes, interfaces and traits should
    |       |     not begin with a file doc comment
 17 | ERROR | [ ] Missing parameter type
 18 | ERROR | [x] Spaces must be used for alignment; tabs are not
    |       |     allowed
 18 | ERROR | [x] Parameter comment indentation must be 3 spaces,
    |       |     found 2 spaces
 21 | ERROR | [ ] Parameter tags must be grouped together in a doc
    |       |     comment
 21 | ERROR | [ ] Missing parameter type
 22 | ERROR | [x] Spaces must be used for alignment; tabs are not
    |       |     allowed
 22 | ERROR | [x] Parameter comment indentation must be 3 spaces,
    |       |     found 2 spaces
 25 | ERROR | [ ] Parameter tags must be grouped together in a doc
    |       |     comment
 25 | ERROR | [ ] Missing parameter type
 26 | ERROR | [x] Spaces must be used for alignment; tabs are not
    |       |     allowed
 26 | ERROR | [x] Parameter comment indentation must be 3 spaces,
    |       |     found 2 spaces
 30 | ERROR | [x] Spaces must be used for alignment; tabs are not
    |       |     allowed
 30 | ERROR | [x] Parameter comment indentation must be 3 spaces,
    |       |     found 2 spaces
 31 | ERROR | [x] Spaces must be used for alignment; tabs are not
    |       |     allowed
 32 | ERROR | [x] Spaces must be used for alignment; tabs are not
    |       |     allowed
 32 | ERROR | [x] Parameter comment indentation must be 3 spaces,
    |       |     found 2 spaces
 33 | ERROR | [x] Spaces must be used for alignment; tabs are not
    |       |     allowed
 34 | ERROR | [x] Spaces must be used for alignment; tabs are not
    |       |     allowed
 35 | ERROR | [x] Spaces must be used for alignment; tabs are not
    |       |     allowed
 36 | ERROR | [x] Spaces must be used for alignment; tabs are not
    |       |     allowed
 36 | ERROR | [x] Parameter comment indentation must be 3 spaces,
    |       |     found 2 spaces
 37 | ERROR | [x] Spaces must be used for alignment; tabs are not
    |       |     allowed
 37 | ERROR | [x] Parameter comment indentation must be 3 spaces,
    |       |     found 2 spaces
 39 | ERROR | [ ] Return type missing for @return tag in function
    |       |     comment
 40 | ERROR | [x] Spaces must be used for alignment; tabs are not
    |       |     allowed
 40 | ERROR | [x] Return comment indentation must be 3 spaces, found
    |       |     2 spaces
----------------------------------------------------------------------
PHPCBF CAN FIX THE 22 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./visualization.api.php
----------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 12 LINES
----------------------------------------------------------------------
 11 | ERROR | [ ] Doc comment short description must be on a single
    |       |     line, further text should be a separate paragraph
 14 | ERROR | [x] Short array syntax must be used to define arrays
 15 | ERROR | [x] Short array syntax must be used to define arrays
 16 | ERROR | [x] Short array syntax must be used to define arrays
 17 | ERROR | [x] Short array syntax must be used to define arrays
 20 | ERROR | [x] Short array syntax must be used to define arrays
 22 | ERROR | [x] Short array syntax must be used to define arrays
 23 | ERROR | [x] Short array syntax must be used to define arrays
 27 | ERROR | [x] Short array syntax must be used to define arrays
 32 | ERROR | [x] Short array syntax must be used to define arrays
 39 | ERROR | [x] Short array syntax must be used to define arrays
 44 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./visualization.info.yml
----------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------
 1 | WARNING | [ ] "core_version_requirement" property is missing in
   |         |     the info.yml file
 5 | ERROR   | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./visualization.links.menu.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 5 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./visualization.module
----------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 9 LINES
----------------------------------------------------------------------
  1 | ERROR | [x] Missing file doc comment
  7 | ERROR | [x] Short array syntax must be used to define arrays
  8 | ERROR | [x] Short array syntax must be used to define arrays
  9 | ERROR | [x] Short array syntax must be used to define arrays
 11 | ERROR | [x] Short array syntax must be used to define arrays
 13 | ERROR | [x] Short array syntax must be used to define arrays
 14 | ERROR | [x] Short array syntax must be used to define arrays
 16 | ERROR | [x] Short array syntax must be used to define arrays
 38 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
----------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------


FILE: ./visualization.theme.inc
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
  1 | ERROR | [x] The PHP open tag must be followed by exactly one
    |       |     blank line
 47 | ERROR | [x] Short array syntax must be used to define arrays
 49 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

Time: 279ms; Memory: 10MB
๐Ÿ“Œ Task
Status

Needs work

Version

1.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia harishh

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia rassoni Bangalore

    Rashmisoni โ†’ made their first commit to this issueโ€™s fork.

  • Merge request !33162002-phpcs Drupal standards โ†’ (Open) created by Unnamed author
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia rassoni Bangalore

    #5 patch appied successfully and no phpcs issues found. Created MR

  • Status changed to Needs work almost 2 years ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, report which command has been used, which arguments have been used, and which report that command shown.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance maro22

    Hey,
    This module not compatible wth drupal 10 ?!
    They are a anthor module like this, for migration site from 7 to 10, please
    Thanks

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sahil.goyal

    Updating the IS

  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia saket-001

    patch #5 applied successfully compatible with my version sharing the SS.

  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
    +  /**
    +   * Construct.
    +   */
       public function __construct(ConfigFactory $config_factory, VisualizationHandlerManager $handler_manager) {
    

    That is not the short description used for class constructors.
    The description for the parameters is missing.

    +  /**
    +   * Form Id.
    +   */
    +  public function getFormId() {
         return 'visualization_settings_form';
       }
     

    Since that is a method defined from the parent class, the documentation comment is different.

     /**
      * @file
    - * Definition of Drupal\visualization\Plugin\VisualizationHandlerManager
    + * Definition of Drupal\visualization\Plugin\VisualizationHandlerManager.
      */
    

    @file is not used for files containing a single class definition.

    +  /**
    +   * Name.
    +   *
    +   * @var name
    +   */
       public $name = 'highcharts';
     
    +  /**
    +   * Added Javascript.
    +   *
    +   * @var addedJavascript
    +   */
       protected $addedJavascript = FALSE;
    +
    +  /**
    +   * Available.
    +   *
    +   * @var available
    +   */
       protected $available = FALSE;
    

    Short descriptions should not just repeat the property name.

    +   *   Some default information is:
    +   *   - title: the label of the chart
    +   *   - type: the internal name of the type of the chart; default types are
    +   *     line, pie and column. Specific charting libraries are welcome to
    +   *     implement custom chart types as they please.
    +   *   - fields: an associative array of internal field names and their labels.
    +   *   - xAxis: options concerning the x-axis (if appropriate)
    +   *   - yAxis: options concerning the y-axis (if appropriate)
    

    The lines after the first one should be indented.

    +   * @return array
    +   *   A string that will be the body of the chart div.
    

    If the returned value is a string, it cannot be an array.

    -core: 8.x
    -configure: visualization.settings_form
    \ No newline at end of file
    +core_version_requirement: ^8
    

    core_version_requirement is recognized only starting from Drupal 8.8. If core: 8.x is replaced by core_version_requirement: ^8, the module is not installable on earlier Drupal versions.

     Drupal.behaviors.visualization_gva = {
    -  attach: function(context) {
    -    $.each($(".visualization-chart-gva", context).not(".visualization-processed"), function(idx, value) {
    +  attach: function (context) {
    +    $.each($(".visualization-chart-gva", context).not(".visualization-processed"), function (idx, value) {
           var chart_id = $(value).attr("id");
           var chart = drupalSettings.visualization[chart_id];
    

    The report shown in the issue summary does not show any issue for JavaScript files. Either the shown report is not complete, or those changes are off-topic.

  • Assigned to sahil.goyal
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sahil.goyal

    addressed all the suggestive coding standards and warnings in #16.
    only last suggestion is left,
    As here task is to address PHPCS issues, which are related to the PHP code standards used in the project.

    Regarding the JavaScript files, the report shown in the issue summary does not indicate any issues related to those files. Therefore, consider those changes as off-topic for current task of addressing PHPCS issues.
    Please review.

    Thanks @apaderno for addressing the issues.

  • Status changed to Needs review over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    I ran phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml ./visualization and I got a longer report than what previously shown.

    I updated the issue summary.

    Please, when opening these issues, show the full report, not only part of it as it is more convenient for the user who is going to provide a patch or create a MR.

  • Status changed to Needs work over 1 year ago
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    Let's start with those issues. I would leave the ones about JavaScript code for a different issue.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sahil.goyal

    Hi @apaderno, when i run phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml ./visualization i can only seen a single issue, not a list of as updated in IS. Attaching Sreenshot.

  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    Cloning the 8.x-1.x branch with git clone --branch '8.x-1.x' https://git.drupalcode.org/project/visualization.git ./visualization
    and then executing phpcs --standard="Drupal,DrupalPractice" --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml ./visualization gives the report shown in the issue summary. I tried again, and the report is not just for a single line.

  • First commit to issue fork.
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • First commit to issue fork.
  • Issue was unassigned.
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • First commit to issue fork.
  • Status changed to Needs review 11 months ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sakthi_dev

    Please review. Addressed as per comment on MR.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

    silvi.addweb โ†’ made their first commit to this issueโ€™s fork.

  • Status changed to Needs work 3 months ago
  • Hi @sakthi_dev & @silvi.addweb,

    The changes you made on MR !3 was applied smoothly, however, one error still reported, please see below:

    visualization git:(8.x-1.x) curl https://git.drupalcode.org/project/visualization/-/merge_requests/3.diff | patch -p1
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100 32383    0 32383    0     0  36151      0 --:--:-- --:--:-- --:--:-- 36590
    patching file js/gva.js
    patching file js/highcharts.js
    patching file js/visualization.js
    patching file src/Form/VisualizationSettingsForm.php
    patching file src/Plugin/VisualizationHandlerManager.php
    patching file src/Plugin/views/style/Visualization.php
    patching file src/Plugin/visualization/handler/GoogleVisualizationAPIHandler.php
    patching file src/Plugin/visualization/handler/HighchartsHandler.php
    patching file src/VisualizationHandlerInterface.php
    patching file visualization.api.php
    patching file visualization.info.yml
    patching file visualization.links.menu.yml
    patching file visualization.module
    patching file visualization.theme.inc
    โžœ  visualization git:(8.x-1.x) โœ— cd ..
    โžœ  contrib git:(main) โœ— phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig visualization
    
    FILE: ...web/modules/contrib/visualization/src/Plugin/views/style/Visualization.php
    --------------------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    --------------------------------------------------------------------------------
     175 | ERROR | Public method name "Visualization::build_sort" is not in
         |       | lowerCamel format
    --------------------------------------------------------------------------------
    
    Time: 279ms; Memory: 10MB

    Kindly check

    Thanks,
    Jake

Production build 0.71.5 2024