Fix the issues reported by phpcs

Created on 6 July 2023, almost 2 years ago
Updated 23 July 2023, over 1 year ago

Problem/Motivation

FILE: /Users/specbee/Sites/Projects/dependent_country_state/dependent_country_state.routing.yml
-------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 14 WARNINGS AFFECTING 14 LINES
-------------------------------------------------------------------------------------------------------------------
   7 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
  15 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
  23 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
  31 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
  39 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
  47 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
  56 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
  64 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
  72 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
  80 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
  88 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
  96 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
 104 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
 112 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
-------------------------------------------------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/dependent_country_state/dependent_country_state.links.action.yml
----------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------
 47 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/dependent_country_state/README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 8 WARNINGS AFFECTING 8 LINES
----------------------------------------------------------------------
  1 | WARNING | Line exceeds 80 characters; contains 222 characters
 12 | WARNING | Line exceeds 80 characters; contains 161 characters
 21 | WARNING | Line exceeds 80 characters; contains 166 characters
 31 | WARNING | Line exceeds 80 characters; contains 164 characters
 41 | WARNING | Line exceeds 80 characters; contains 164 characters
 49 | WARNING | Line exceeds 80 characters; contains 87 characters
 55 | WARNING | Line exceeds 80 characters; contains 156 characters
 60 | WARNING | Line exceeds 80 characters; contains 165 characters
----------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/dependent_country_state/dependent_country_state.module
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 47 ERRORS AND 6 WARNINGS AFFECTING 31 LINES
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  1 | ERROR   | [x] Missing file doc comment
 10 | ERROR   | [x] Missing function doc comment
 10 | ERROR   | [ ] dependent_country_state_install() is an installation hook and must be declared in an install file
 17 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
 19 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 1
 19 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 20 | ERROR   | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
 22 | ERROR   | [ ] The array declaration extends to column 97 (the limit is 80). The array content should be split up over multiple lines
 22 | ERROR   | [x] Expected 1 space between comma and "'created'"; 0 found
 22 | ERROR   | [x] Expected one space after the comma, 0 found
 23 | WARNING | [ ] Unused variable $key.
 25 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 26 | ERROR   | [ ] The array declaration extends to column 97 (the limit is 80). The array content should be split up over multiple lines
 29 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 6
 29 | ERROR   | [x] Closing brace indented incorrectly; expected 4 spaces, found 6
 30 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 5
 31 | ERROR   | [x] Closing brace indented incorrectly; expected 1 spaces, found 2
 35 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 39 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 5
 40 | ERROR   | [x] Object operator not indented correctly; expected 7 spaces but found 8
 40 | ERROR   | [x] Expected 1 space between comma and "'state_name'"; 0 found
 40 | ERROR   | [x] Expected one space after the comma, 0 found
 40 | ERROR   | [x] Expected 1 space between comma and "'created'"; 0 found
 40 | ERROR   | [x] Expected one space after the comma, 0 found
 42 | WARNING | [ ] Unused variable $key.
 44 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 46 | ERROR   | [x] Line indented incorrectly; expected 6 spaces, found 8
 46 | ERROR   | [x] Closing brace indented incorrectly; expected 6 spaces, found 8
 48 | ERROR   | [x] Line indented incorrectly; expected 4 spaces, found 2
 53 | ERROR   | [x] Missing function doc comment
 53 | ERROR   | [ ] dependent_country_state_uninstall() is an installation hook and must be declared in an install file
 53 | ERROR   | [x] Expected 1 space before opening brace; found 0
 55 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 56 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 57 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 58 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 62 | ERROR   | [x] Missing function doc comment
 62 | ERROR   | [x] Namespaced classes/interfaces/traits should be referenced with use statements
 63 | ERROR   | [x] Whitespace found at end of line
 64 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 64 | ERROR   | [x] No space found before comment text; expected "// if($form_id == 'dependent_country_state_city_form') {" but found "//if($form_id ==
    |         |     'dependent_country_state_city_form') {"
 65 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
 65 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 5
 65 | ERROR   | [x] No space found before comment text; expected "// $form['#attached']['library'][] = 'dependent_country_state/dependent_city';" but found
    |         |     "//$form['#attached']['library'][] = 'dependent_country_state/dependent_city';"
 66 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters
 66 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 5
 66 | ERROR   | [x] No space found before comment text; expected "// $form['#attached']['drupalSettings']['dependent_country_state']['city'] = 'Delhi';" but found
    |         |     "//$form['#attached']['drupalSettings']['dependent_country_state']['city'] = 'Delhi';"
 67 | WARNING | [x] There must be no blank line following an inline comment
 67 | WARNING | [ ] There must be no blank line following an inline comment
 67 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 4
 67 | ERROR   | [x] No space found before comment text; expected "// }" but found "//}"
 67 | ERROR   | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses
 69 | ERROR   | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 44 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/dependent_country_state/README.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 8 WARNINGS AFFECTING 8 LINES
----------------------------------------------------------------------
  1 | WARNING | Line exceeds 80 characters; contains 222 characters
 12 | WARNING | Line exceeds 80 characters; contains 161 characters
 21 | WARNING | Line exceeds 80 characters; contains 166 characters
 31 | WARNING | Line exceeds 80 characters; contains 164 characters
 41 | WARNING | Line exceeds 80 characters; contains 164 characters
 49 | WARNING | Line exceeds 80 characters; contains 87 characters
 56 | WARNING | Line exceeds 80 characters; contains 156 characters
 61 | WARNING | Line exceeds 80 characters; contains 165 characters
----------------------------------------------------------------------


FILE: /Users/specbee/Sites/Projects/dependent_country_state/dependent_country_state.install
-------------------------------------------------------------------------------------------------
FOUND 81 ERRORS AFFECTING 70 LINES
-------------------------------------------------------------------------------------------------
   9 | ERROR | [x] Doc comment short description must start with a capital letter
  13 | 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
  22 | ERROR | [x] Short array syntax must be used to define arrays
  28 | ERROR | [x] Short array syntax must be used to define arrays
  34 | ERROR | [x] Array indentation error, expected 6 spaces but found 4
  34 | ERROR | [x] Short array syntax must be used to define arrays
  35 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
  36 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
  37 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
  38 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
  39 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 6
  40 | ERROR | [x] Array indentation error, expected 6 spaces but found 4
  40 | ERROR | [x] Short array syntax must be used to define arrays
  41 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
  42 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
  43 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
  44 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
  45 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
  46 | ERROR | [x] Array closing indentation error, expected 4 spaces but found 6
  48 | ERROR | [x] Short array syntax must be used to define arrays
  57 | ERROR | [x] Array indentation error, expected 4 spaces but found 5
  61 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
  61 | ERROR | [x] Short array syntax must be used to define arrays
  62 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
  63 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
  63 | ERROR | [x] Short array syntax must be used to define arrays
  64 | ERROR | [x] Short array syntax must be used to define arrays
  71 | ERROR | [x] Short array syntax must be used to define arrays
  78 | ERROR | [x] Short array syntax must be used to define arrays
  85 | ERROR | [x] Short array syntax must be used to define arrays
  93 | ERROR | [x] Array indentation error, expected 6 spaces but found 7
  93 | ERROR | [x] Short array syntax must be used to define arrays
  94 | ERROR | [x] Array indentation error, expected 9 spaces but found 8
  95 | ERROR | [x] Array indentation error, expected 9 spaces but found 8
  96 | ERROR | [x] Array indentation error, expected 9 spaces but found 8
  97 | ERROR | [x] Array indentation error, expected 9 spaces but found 8
  98 | ERROR | [x] Array closing indentation error, expected 7 spaces but found 6
 101 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
 103 | ERROR | [x] Array closing indentation error, expected 3 spaces but found 2
 104 | ERROR | [x] Functions must not contain multiple empty lines in a row; found 2 empty lines
 106 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
 106 | ERROR | [x] Short array syntax must be used to define arrays
 108 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
 109 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
 109 | ERROR | [x] Short array syntax must be used to define arrays
 111 | ERROR | [x] Short array syntax must be used to define arrays
 118 | ERROR | [x] Short array syntax must be used to define arrays
 125 | ERROR | [x] Short array syntax must be used to define arrays
 132 | ERROR | [x] Short array syntax must be used to define arrays
 139 | ERROR | [x] Short array syntax must be used to define arrays
 147 | ERROR | [x] Array indentation error, expected 6 spaces but found 7
 147 | ERROR | [x] Short array syntax must be used to define arrays
 148 | ERROR | [x] Array indentation error, expected 9 spaces but found 8
 149 | ERROR | [x] Array indentation error, expected 9 spaces but found 8
 150 | ERROR | [x] Array indentation error, expected 9 spaces but found 8
 151 | ERROR | [x] Array indentation error, expected 9 spaces but found 8
 152 | ERROR | [x] Array closing indentation error, expected 7 spaces but found 6
 155 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
 157 | ERROR | [x] Array closing indentation error, expected 3 spaces but found 2
 159 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
 159 | ERROR | [x] Short array syntax must be used to define arrays
 161 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
 162 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
 162 | ERROR | [x] Short array syntax must be used to define arrays
 163 | ERROR | [x] Short array syntax must be used to define arrays
 169 | ERROR | [x] Array indentation error, expected 6 spaces but found 7
 169 | ERROR | [x] Short array syntax must be used to define arrays
 170 | ERROR | [x] Array indentation error, expected 9 spaces but found 8
 171 | ERROR | [x] Array indentation error, expected 9 spaces but found 8
 172 | ERROR | [x] Array indentation error, expected 9 spaces but found 8
 173 | ERROR | [x] Array indentation error, expected 9 spaces but found 8
 174 | ERROR | [x] Array closing indentation error, expected 7 spaces but found 6
 176 | ERROR | [x] Short array syntax must be used to define arrays
 182 | ERROR | [x] Short array syntax must be used to define arrays
 189 | ERROR | [x] Short array syntax must be used to define arrays
 196 | ERROR | [x] Short array syntax must be used to define arrays
 203 | ERROR | [x] Short array syntax must be used to define arrays
 211 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
 213 | ERROR | [x] Array closing indentation error, expected 3 spaces but found 2
-------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 81 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------

Time: 585ms; Memory: 12MB

Steps to reproduce

Execute the command:

phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig dependent_country_state/
📌 Task
Status

Needs work

Version

1.0

Component

Code

Created by

🇮🇳India urvashi_vora Madhya Pradesh, India

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

Comments & Activities

  • Issue created by @urvashi_vora
  • Status changed to Needs work almost 2 years ago
  • 🇵🇭Philippines roberttabigue

    Hi @urvashi_vora,

    Your patch provided didn't work on my end.

    I applied your patch to the Dependent Country, State and City module against 1.0.6.

    Ran this command on the module:
    curl https://www.drupal.org/files/issues/2023-07-06/coding-standard-fixes_10.patch | git apply -v

    Please see the attached file for your reference.

    Moving this to Needs work for now.

    Thank you!

  • Assigned to yashmalviya
  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India ashutosh ahirwal India

    Providing a updated patch and some of the issue remaining to maintainer should look into this.

    Remaining issues.

    FILE: /Users/ashutoshahirwal/Sites/lando/contribution/web/modules/custom/dependent_country_state/dependent_country_state.routing.yml
    ------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 14 WARNINGS AFFECTING 14 LINES
    ------------------------------------------------------------------------------------------------------------------------------------
    7 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
    15 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
    23 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
    31 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
    39 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
    47 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
    56 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
    64 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
    72 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
    80 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
    88 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
    96 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
    104 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
    112 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
    ------------------------------------------------------------------------------------------------------------------

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Since this issue does not give clear instructions for a novice user, this is not an issue for novice users.

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
     /**
    - * hook_schema()
    + * Hook_schema()
      */
     function dependent_country_state_schema() {

    The correct description for a hook implementation is Implements hook_schema().

    +function dependent_country_state_uninstall() {
    +
    +  \Drupal::database()->schema()->dropTable('dependent_country');
    +  \Drupal::database()->schema()->dropTable('dependent_state');
    +  \Drupal::database()->schema()->dropTable('dependent_city');
    +  \Drupal::database()->schema()->dropTable('dependent_pincode');
    +}

    There is no need to put an empty line before the function first code line.

    +/**
    + * Implements hook_form_alter().
    + */
    +function dependent_country_state_form_alter(&$form, FormStateInterface $form_state, $form_id) {
     
    +  // if($form_id == 'dependent_country_state_city_form') {
    +  // $form['#attached']['library'][] = 'dependent_country_state/dependent_city';
    +  // $form['#attached']['drupalSettings']['dependent_country_state']['city'] =
    +  // 'Delhi';
    +  // }.
     }

    The description of that hook must say which form is altered.
    No period is added to commented out code.

  • Status changed to Needs review over 1 year ago
  • 🇮🇳India yashmalviya

    I have fixed some remaining issues. Please review

  • Status changed to Needs work over 1 year ago
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
    diff --git a/README.md b/README.md
    index d11ee5d..6b24c3f 100644
    --- a/README.md
    +++ b/README.md
    @@ -1,4 +1,8 @@
    -Dependent Country State City modules extend your site functionality and provide feature to add/edit/delete Country State City and pincode/area as per your need. This module also provide API for fetching data from Database.
    +Dependent Country State City modules extend your
    +site functionality and provide feature to
    +add/edit/delete Country State City and pincode/area as
    +per your need. This module also provide API for
    +fetching data from Database.
     
     Go To Main Navigation -> Configuration -> Country, state and city
     1. Country List
    @@ -9,7 +13,10 @@ Go To Main Navigation -> Configuration -> Country, state and city
     
     Country.
     
    -By Default all country added by module or you can add/edit/delete as per your need. Also provide API to fetch the data in json format. Below are the API details.
    +By Default all country added by module or you
    +can add/edit/delete as per your need.
    +Also provide API to fetch the data in json format.
    +Below are the API details.
     
     End Point: admin/city-state-city/api/get-country
     query parameter with id : admin/city-state-city/api/get-country?id=103
    @@ -18,7 +25,10 @@ query parameter with name : admin/city-state-city/api/get-country?country_name=I
     
     State.
     
    -By Default all india states added by module or you can add/edit/delete as per your need. Also provide API to fetch the data in json format. Below are the API details.
    +By Default all india states added by module or
    +you can add/edit/delete as per your need.
    +Also provide API to fetch the data in json format.
    +Below are the API details.
     
     End Point: /admin/city-state-city/api/get-state/103
     here 103 mean country ID:
    @@ -28,7 +38,10 @@ query parameter with name : /admin/city-state-city/api/get-state/103?state_name=
     
     City.
     
    -There is no default data added by module but you can add/edit/delete as per your need. Also provide API to fetch the data in json format. Below are the API details.
    +There is no default data added by module but
    +you can add/edit/delete as per your need.
    +Also provide API to fetch the data in json format.
    +Below are the API details.
     
     End Point: /admin/city-state-city/api/get-city/32
     here 32 mean state ID:
    @@ -38,7 +51,10 @@ query parameter with name : /admin/city-state-city/api/get-city/32?city_name=Del
     
     Pincode.
     
    -There is no default data added by module but you can add/edit/delete as per your need. Also provide API to fetch the data in json format. Below are the API details.
    +There is no default data added by module but
    +you can add/edit/delete as per your need.
    +Also provide API to fetch the data in json format.
    +Below are the API details.
     
     End Point: /admin/city-state-city/api/get-areapincode/2
     here 2 mean city ID:
    @@ -46,18 +62,23 @@ here 2 mean city ID:
     query parameter with name : /admin/city-state-city/api/get-areapincode/2?pincode_area=11
     
     
    -Note: Make sure to give right performission to right role to get access API of feature.
    +Note: Make sure to give right performission
    +to right role to get access API of feature.
     
     
     PLACING MODULE IN THIS DIRECTORY
     ------------------------------------
     
    -You may create custom directory inside /web/module if already is not created, and place this module in web/module/custom directory, to organize your module.
    +You may create custom directory inside /web/module
    +if already is not created, and place this module
    +in web/module/custom directory, to organize your module.
     
     
     ENABLE MODULE
     -----------------------
    -You can enabled it using drush en dependent_country_state or from User Interface (admin/modules) search your module name and click on checkbox then click on install.
    +You can enabled it using drush en dependent_country_state
    +or from User Interface (admin/modules) search your module
    +name and click on checkbox then click on install.
     
     
     HOW TO CONFIGURE.
    diff --git a/README.txt b/README.txt
    index 16627bb..44ee3f4 100644
    --- a/README.txt
    +++ b/README.txt
    @@ -1,4 +1,7 @@
    -Dependent Country State City modules extend your site functionality and provide feature to add/edit/delete Country State City and pincode/area as per your need. This module also provide API for fetching data from Database.
    +Dependent Country State City modules extend your
    +site functionality and provide feature to add/edit/delete
    +Country State City and pincode/area as per your need.
    +This module also provide API for fetching data from Database.
     
     Go To Main Navigation -> Configuration -> Country, state and city
     1. Country List
    @@ -9,7 +12,10 @@ Go To Main Navigation -> Configuration -> Country, state and city
     
     Country.
     
    -By Default all country added by module or you can add/edit/delete as per your need. Also provide API to fetch the data in json format. Below are the API details.
    +By Default all country added by module or
    +you can add/edit/delete as per your need.
    +Also provide API to fetch the data in json format.
    +Below are the API details.
     
     End Point: admin/city-state-city/api/get-country
     query parameter with id : admin/city-state-city/api/get-country?id=103
    @@ -18,7 +24,10 @@ query parameter with name : admin/city-state-city/api/get-country?country_name=I
     
     State.
     
    -By Default all india states added by module or you can add/edit/delete as per your need. Also provide API to fetch the data in json format. Below are the API details.
    +By Default all india states added by module or
    +you can add/edit/delete as per your need.
    +Also provide API to fetch the data in json format.
    +Below are the API details.
     
     End Point: /admin/city-state-city/api/get-state/103
     here 103 mean country ID:
    @@ -28,7 +37,10 @@ query parameter with name : /admin/city-state-city/api/get-state/103?state_name=
     
     City.
     
    -There is no default data added by module but you can add/edit/delete as per your need. Also provide API to fetch the data in json format. Below are the API details.
    +There is no default data added by module but
    +you can add/edit/delete as per your need.
    +Also provide API to fetch the data in json format.
    +Below are the API details.
     
     End Point: /admin/city-state-city/api/get-city/32
     here 32 mean state ID:
    @@ -38,7 +50,10 @@ query parameter with name : /admin/city-state-city/api/get-city/32?city_name=Del
     
     Pincode.
     
    -There is no default data added by module but you can add/edit/delete as per your need. Also provide API to fetch the data in json format. Below are the API details.
    +There is no default data added by module
    +but you can add/edit/delete as per your need.
    +Also provide API to fetch the data in json format.
    +Below are the API details.
     
     End Point: /admin/city-state-city/api/get-areapincode/2
     here 2 mean city ID:
    @@ -46,19 +61,25 @@ here 2 mean city ID:
     query parameter with name : /admin/city-state-city/api/get-areapincode/2?pincode_area=11
     
     
    -Note: Make sure to give right performission to right role to get access API of feature.
    +Note: Make sure to give right performission to
    +right role to get access API of feature.
     
     
     
     PLACING MODULE IN THIS DIRECTORY
     ------------------------------------
     
    -You may create custom directory inside /web/module if already is not created, and place this module in web/module/custom directory, to organize your module.
    +You may create custom directory inside /web/module if
    +already is not created, and place this module
    +in web/module/custom directory,
    +to organize your module.
     
     
     ENABLE MODULE
     -----------------------
    -You can enabled it using drush en dependent_country_state or from User Interface (admin/modules) search your module name and click on checkbox then click on install.
    +You can enabled it using drush en dependent_country_state
    +or from User Interface (admin/modules) search
    +your module name and click on checkbox then click on install.

    All those lines have been limited to 40/60 characters when they should not exceed 80 characters. not exceed 80 characters means getting as close as possible to 80 characters without splitting a word or a URL on two lines.

    diff --git a/dependent_country_state.install b/dependent_country_state.install
    index 2ed753b..e30784f 100644
    --- a/dependent_country_state.install
    +++ b/dependent_country_state.install
    @@ -2,215 +2,226 @@
     
     /**
      * @file
    - * Helps to create database for storing voucher data.
    + * Helps to create the database for storing voucher data.
      */
    

    The description for a .install file is Install, update, and uninstall functions for the [module name] module. where [module name] is the module name reported in the .info.yml file.

     /**
    - * hook_schema()
    + * Implements hook_uninstall().
    + *
    + * Uninstalls the Dependent Country State module
    + * and drops the module-related tables from the database.
      */
    -function dependent_country_state_schema() {
    +function dependent_country_state_uninstall() {
    +  // Remove the database tables defined in hook_schema().
    +  // The tables will be dropped automatically during module uninstallation.
    +  $schema = dependent_country_state_schema();
    +  foreach ($schema as $table_name => $table_schema) {
    +    db_drop_table($table_name);
    +  }
    +}
     
    -  $schema['dependent_country'] = array(
    -    'description' => 'Store Country table defination',
    -    'fields' => array(
    -      'id' => array(
    +/**
    + * Implements hook_schema().
    + *
    + * Defines the database schema for the Dependent Country State module.
    + */
    

    The long description is not necessary, since it just describes what that hook does.

     /**
      * @file
      * Primary module hooks for Dependent Country State Module.
      */

    There are not primary hooks on Drupal.
    The description to use is Hook implementations for the Dependent Country, State and City module.

    +/**
    + * Implements hook_form_alter().
    + *
    + * Custom form alterations can be added here
    + * For the Dependent Country State module.
    + */
    +function dependent_country_state_form_alter(&$form, FormStateInterface $form_state, $form_id) {
    

    The short description must say which form is altered.
    The long description is not necessary, since the only information it gives is the module that implements it (although it does not use the correct module name).

    -dependent_country_state.country:
    -  path: '/admin/config/dependent-state-city/list-country'
    -  defaults:
    -    _controller: 'Drupal\dependent_country_state\Controller\CountryController::list'
    -    _title: 'List Country'
    -  requirements:
    -    _access: 'TRUE'
    -
    -dependent_country_state.state:
    -  path: '/admin/config/dependent-state-city/list-state'
    -  defaults:
    -    _controller: 'Drupal\dependent_country_state\Controller\StateController::list'
    -    _title: 'List State'
    -  requirements:
    -    _access: 'TRUE'
    -
    -dependent_country_state.state_add:
    -  path: '/admin/config/dependent-state-city/state/add'
    -  defaults:
    -    _form: '\Drupal\dependent_country_state\Form\AddStateForm'
    -    _title: 'Add States'
    -  requirements:
    -    _access: 'TRUE'
    -
    -dependent_country_state.country_add:
    -  path: '/admin/config/dependent-state-city/country/add'
    -  defaults:
    -    _form: '\Drupal\dependent_country_state\Form\AddCForm'
    -    _title: 'Add Country'
    -  requirements:
    -    _access: 'TRUE'
    -
    -dependent_country_state.city:
    -  path: '/admin/config/city-state-city/list-city'
    -  defaults:
    -    _controller: 'Drupal\dependent_country_state\Controller\CityController::list'
    -    _title: 'City List'
    -  requirements:
    -    _access: 'TRUE'
    -
    -dependent_country_state.add_city:
    -  path: '/admin/config/dependent-state-city/city/add'
    -  defaults:
    -    _form: '\Drupal\dependent_country_state\Form\AddCtForm'
    -    _title: 'Add City'
    -  requirements:
    -    _access: 'TRUE'
    -
    -
    -dependent_country_state.pincode:
    -  path: '/admin/config/dependent-state-city/list-pincode'
    -  defaults:
    -    _controller: 'Drupal\dependent_country_state\Controller\PincodeController::list'
    -    _title: 'Pincode List'
    -  requirements:
    -    _access: 'TRUE'
    -
    -dependent_country_state.add_pincode:
    -  path: '/admin/config/dependent-state-city/pincode/add'
    -  defaults:
    -    _form: '\Drupal\dependent_country_state\Form\AddPincodeForm'
    -    _title: 'Add Pincode'
    -  requirements:
    -    _access: 'TRUE'
    -
    -dependent_country_state.state_list_form_delete:
    -  path: '/admin/config/country/dependent_country_state/state/delete/{sid}'
    -  defaults:
    -    _form: '\Drupal\dependent_country_state\Form\DeleteStateForm'
    -    _title: 'Delete States'
    -  requirements:
    -    _access: 'TRUE'
    -
    -dependent_country_state.pincode_list_form_delete:
    -  path: '/admin/config/country/dependent_country_state/pincode/delete/{sid}'
    -  defaults:
    -    _form: '\Drupal\dependent_country_state\Form\DeletePincodeForm'
    -    _title: 'Delete States'
    -  requirements:
    -    _access: 'TRUE'
    -
    -dependent_country_state.city_list_form_delete:
    -  path: '/admin/config/country/dependent_country_state/city/delete/{sid}'
    -  defaults:
    -    _form: '\Drupal\dependent_country_state\Form\DeleteCityForm'
    -    _title: 'Delete City'
    -  requirements:
    -    _access: 'TRUE'
    -
    -dependent_country_state.country_list_form_delete:
    -  path: '/admin/config/country/dependent_country_state/country/delete/{sid}'
    -  defaults:
    -    _form: '\Drupal\dependent_country_state\Form\DeleteCountryForm'
    -    _title: 'Delete Country'
    -  requirements:
    -    _access: 'TRUE'
    -
    -dependent_country_state.state_list_form:
    -  path: '/admin/config/country/state/list'
    -  defaults:
    -    _form: '\Drupal\dependent_country_state\Form\StateForm'
    -    _title: 'States Filter Form'
    -  requirements:
    -    _access: 'TRUE'
    -
    -dependent_country_state.city_list_form:
    -  path: '/admin/config/country/city/list'
    -  defaults:
    -    _form: '\Drupal\dependent_country_state\Form\CityForm'
    -    _title: 'States Filter Form'
    -  requirements:
    -    _access: 'TRUE'
    

    PHP_CodeSniffer says to describe why those routes do not check who access them, not to remove them.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Furthermore, the issue summary must show all the reported warnings/errors, not part of them.

  • 🇨🇦Canada imustakim Canada

    Issue summary updated.

Production build 0.71.5 2024