CommentFileSizeAuthor
#14 CONFIG-ENFORCE.png49.56 KBkalash-j
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sidharth_soman created an issue. See original summary.

sidharth_soman’s picture

Assigned: sidharth_soman » Unassigned
Status: Needs work » Needs review

I've fixed all the issues except for those relating to filling out/correcting documentation (which should ideally be done by the maintainers). Please review the above MR.

avpaderno’s picture

Priority: Normal » Minor
Status: Needs review » Needs work
+/**
+ * @file
+ * Defines the install hooks for the module.
+ */

The usual comment is Install, uninstall, and update hooks for the [module name] module.

+/**
+ * @file
+ * Defines the hooks for the module.
+ */
+

That should be Hook implementations for the [module name] module.

 function config_enforce_devel_module_implements_alter(
-  array &$implementations, string $hook
+  array &$implementations,
+ string $hook
 ): void {

As per coding standards, that should go all in one line.

       // @see EnforcedConfigRegistry::updateEnforcedConfigs().
-      if (in_array($config_name, $registries)) continue;
+      if (in_array($config_name, $registries)) {

@see does not need a final period.

+   * @param $enforced_configs_to_update
+   *   array of enforced config settings that need to updated.

The description must start with a capitalized word.
Also, the parameter type is given after @param, not in the short description.

-      // @TODO: Log this?
+      // @todo Log this?

What follows @todo should be an imperative sentence.

-   * @var string The name of the config object.
+   * @var stringThenameoftheconfigobject

No, the issue on the existing documentation comment for that class property is not that it uses spaces where they should not be.

+  /**
+   *
+   */
   public function __construct($config_name, $settings) {

Documentation comments must not be empty.

-   * @param $new_settings array New enforced config settings.
+   * @param $new_settings
+   *   array New enforced config settings.

That not how parameters are documented.

+  /**
+   * The target module's machine-readable name.
+   */
   protected $machineName;

The @var tag is missing.

+  /**
+   * An instance of the Drupal file system service.
+   */
   protected $fileSystem;

It is sufficient to say The file system service.

ambient.impact’s picture

I appreciate all the work that's going into this. We're currently focused on building up the test suite for both modules and then will heavily rewrite most of the internals, along with much better documentation and more consistent coding style. You can find a high level overview in #3305516: Config Enforce roadmap and #3306273: Config Enforce Devel roadmap.

avpaderno’s picture

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.

ashutosh ahirwal’s picture

Issue summary: View changes

I Have updated the issue summary.

avpaderno’s picture

nitin_lama made their first commit to this issue’s fork.

bharath-kondeti made their first commit to this issue’s fork.

avpaderno’s picture

Status: Needs work » Needs review
a.aaronjake’s picture

Status: Needs review » Needs work

Hi @bharath_kondeti,

Applied latest changes on MR !9, it seems to have problem, might be the reason it threw multiple errors. Please see below:

config_enforce_devel git:(1.0.x) curl https://git.drupalcode.org/project/config_enforce_devel/-/merge_requests/19.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 67062    0 67062    0     0   113k      0 --:--:-- --:--:-- --:--:--  115k
patching file README.md
patching file config_enforce_devel.install
patching file config_enforce_devel.module
patching file css/config-enforce-devel.css
patching file docs/archetypes/default.md
patching file docs/content/how-to/add-config-enforce-to-a-project.md
patching file docs/content/how-to/generate-settings-from-active-storage.md
patching file docs/content/how-to/generate-settings-from-modules.md
patching file docs/content/how-to/simulate-production-deployment.md
patching file docs/content/reference/security-model.md
patching file docs/content/reference/terminology.md
patching file docs/content/tutorials/basic-usage.md
patching file docs/content/tutorials/getting-started.md
patching file docs/content/tutorials/installation.md
patching file docs/static/css/config-enforce.css
patching file src/ConfigDevelHelper.php
patching file src/EnforcedConfigCollection.php
patching file src/EnforcedConfigFile.php
patching file src/EnforcedConfigRegistry.php
patching file src/EventSubscriber/ConfigDeleteSubscriber.php
patching file src/Form/AddModuleForm.php
patching file src/Form/DevelFormHelperTrait.php
Hunk #1 succeeded at 43 (offset 7 lines).
Hunk #2 succeeded at 93 (offset 7 lines).
Hunk #3 succeeded at 125 (offset 7 lines).
Hunk #4 succeeded at 183 (offset 7 lines).
Hunk #5 succeeded at 200 (offset 7 lines).
Hunk #6 succeeded at 237 (offset 7 lines).
Hunk #7 succeeded at 347 (offset 7 lines).
Hunk #8 succeeded at 363 (offset 7 lines).
Hunk #9 succeeded at 386 (offset 7 lines).
Hunk #10 succeeded at 402 (offset 7 lines).
Hunk #11 succeeded at 425 (offset 7 lines).
Hunk #12 succeeded at 450 (offset 7 lines).
Hunk #13 succeeded at 535 (offset 7 lines).
Hunk #14 succeeded at 555 (offset 7 lines).
Hunk #15 succeeded at 578 (offset 7 lines).
Hunk #16 succeeded at 594 (offset 7 lines).
Hunk #17 succeeded at 610 (offset 7 lines).
Hunk #18 succeeded at 649 (offset 7 lines).
patching file src/Form/EmbeddedEnforceForm.php
patching file src/Form/EnforcedConfigs.php
patching file src/Form/GenerateFormBase.php
patching file src/Form/GenerateFromActiveStorageForm.php
patching file src/Form/GenerateFromModulesForm.php
patching file src/Form/ModalEnforceForm.php
patching file src/Form/ModalFormHelperTrait.php
patching file src/Form/SettingsForm.php
patching file src/Form/ThemeSettingsFormTrait.php
patching file src/FormHandler/DevelEnforceFormHandler.php
patching file src/FormHandler/ThemeSettingsFormHandlerTrait.php
patching file src/TargetModule.php
patching file src/TargetModuleBuilder.php
patching file src/TargetModuleCollection.php
patching file src/TargetModuleInstaller.php
patching file src/ToolbarHandler.php
patching file tests/src/Functional/DefaultTargetModuleTest.php
patching file tests/src/Functional/FormAlterImplementationOrderTest.php
➜  config_enforce_devel git:(1.0.x) ✗ cd ..
➜  contrib git:(master) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig config_enforce_devel

FILE: ...rns/Demo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/config_enforce_devel.module
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------
 11 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is
    |         |     Drupal\config_enforce_devel\ToolbarHandler.
 18 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for
    |         |     xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for xyz-bar.html.twig.", "*
    |         |     Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements
    |         |     hook_foo_BAR_ID_bar() for block templates."
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/docs/content/background/best-practices.md
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 8 | WARNING | Line exceeds 80 characters; contains 119 characters
-----------------------------------------------------------------------------------------------------------


FILE: ...ue-v9/web/modules/contrib/config_enforce_devel/docs/content/how-to/add-config-enforce-to-a-project.md
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------
 20 | WARNING | Line exceeds 80 characters; contains 101 characters
 27 | WARNING | Line exceeds 80 characters; contains 85 characters
-----------------------------------------------------------------------------------------------------------


FILE: ...sue-v9/web/modules/contrib/config_enforce_devel/docs/content/how-to/simulate-production-deployment.md
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 8 WARNINGS AFFECTING 8 LINES
-----------------------------------------------------------------------------------------------------------
  8 | WARNING | Line exceeds 80 characters; contains 131 characters
 11 | WARNING | Line exceeds 80 characters; contains 101 characters
 12 | WARNING | Line exceeds 80 characters; contains 187 characters
 13 | WARNING | Line exceeds 80 characters; contains 184 characters
 14 | WARNING | Line exceeds 80 characters; contains 178 characters
 15 | WARNING | Line exceeds 80 characters; contains 117 characters
 16 | WARNING | Line exceeds 80 characters; contains 154 characters
 17 | WARNING | Line exceeds 80 characters; contains 117 characters
-----------------------------------------------------------------------------------------------------------


FILE: ...al-orgissue-v9/web/modules/contrib/config_enforce_devel/docs/content/how-to/apply-enforced-configs.md
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 8 | WARNING | Line exceeds 80 characters; contains 113 characters
-----------------------------------------------------------------------------------------------------------


FILE: ...ite/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/docs/content/tutorials/basic-usage.md
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 11 WARNINGS AFFECTING 11 LINES
-----------------------------------------------------------------------------------------------------------
  7 | WARNING | Line exceeds 80 characters; contains 325 characters
  9 | WARNING | Line exceeds 80 characters; contains 159 characters
 10 | WARNING | Line exceeds 80 characters; contains 90 characters
 11 | WARNING | Line exceeds 80 characters; contains 225 characters
 12 | WARNING | Line exceeds 80 characters; contains 143 characters
 13 | WARNING | Line exceeds 80 characters; contains 234 characters
 14 | WARNING | Line exceeds 80 characters; contains 194 characters
 15 | WARNING | Line exceeds 80 characters; contains 148 characters
 16 | WARNING | Line exceeds 80 characters; contains 159 characters
 17 | WARNING | Line exceeds 80 characters; contains 189 characters
 19 | WARNING | Line exceeds 80 characters; contains 240 characters
-----------------------------------------------------------------------------------------------------------


FILE: ...drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/docs/content/tutorials/getting-started.md
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 9 WARNINGS AFFECTING 9 LINES
-----------------------------------------------------------------------------------------------------------
  7 | WARNING | Line exceeds 80 characters; contains 117 characters
  8 | WARNING | Line exceeds 80 characters; contains 164 characters
  9 | WARNING | Line exceeds 80 characters; contains 224 characters
 10 | WARNING | Line exceeds 80 characters; contains 151 characters
 12 | WARNING | Line exceeds 80 characters; contains 235 characters
 13 | WARNING | Line exceeds 80 characters; contains 260 characters
 14 | WARNING | Line exceeds 80 characters; contains 132 characters
 15 | WARNING | Line exceeds 80 characters; contains 172 characters
 21 | WARNING | Line exceeds 80 characters; contains 342 characters
-----------------------------------------------------------------------------------------------------------


FILE: ...te/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/docs/content/tutorials/installation.md
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 29 | WARNING | Line exceeds 80 characters; contains 149 characters
-----------------------------------------------------------------------------------------------------------


FILE: ...ite/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/docs/content/reference/terminology.md
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
-----------------------------------------------------------------------------------------------------------
  5 | WARNING | Line exceeds 80 characters; contains 317 characters
  7 | WARNING | Line exceeds 80 characters; contains 194 characters
  8 | WARNING | Line exceeds 80 characters; contains 166 characters
  9 | WARNING | Line exceeds 80 characters; contains 192 characters
 10 | WARNING | Line exceeds 80 characters; contains 242 characters
 12 | WARNING | Line exceeds 80 characters; contains 399 characters
 14 | WARNING | Line exceeds 80 characters; contains 214 characters
-----------------------------------------------------------------------------------------------------------


FILE: .../drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/docs/content/reference/security-model.md
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------
  7 | WARNING | Line exceeds 80 characters; contains 195 characters
 11 | WARNING | Line exceeds 80 characters; contains 248 characters
-----------------------------------------------------------------------------------------------------------


FILE: ...emo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/docs/content/reference/_index.md
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 7 | WARNING | Line exceeds 80 characters; contains 96 characters
-----------------------------------------------------------------------------------------------------------


FILE: ...tInterns/Demo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/docs/content/_index.md
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 12 | WARNING | Line exceeds 80 characters; contains 235 characters
-----------------------------------------------------------------------------------------------------------


FILE: ...terns/Demo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/ConfigDevelHelper.php
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------
 19 | WARNING | Unused variable $config_name.
 35 | WARNING | Unused variable $config_name.
 62 | WARNING | Line exceeds 80 characters; contains 90 characters
 75 | WARNING | Line exceeds 80 characters; contains 87 characters
-----------------------------------------------------------------------------------------------------------


FILE: ...terns/Demo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/Form/SettingsForm.php
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 123 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t()
     |         | for variables
-----------------------------------------------------------------------------------------------------------


FILE: ...mo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/Form/ModalFormHelperTrait.php
-----------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------
  22 | ERROR   | Missing member variable doc comment
  84 | WARNING | Only string literals should be passed to t() where possible
 149 | WARNING | Line exceeds 80 characters; contains 87 characters
 198 | ERROR   | Protected method name "ModalFormHelperTrait::isAConfirmForm" is not in lowerCamel format
-----------------------------------------------------------------------------------------------------------


FILE: ...s/Demo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/Form/GenerateFormBase.php
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 115 | WARNING | Line exceeds 80 characters; contains 83 characters
-----------------------------------------------------------------------------------------------------------


FILE: ...ns/Demo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/Form/EnforcedConfigs.php
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------
  13 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is
     |         |     Drupal\config_enforce\EnforcedConfig.
 237 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters
 309 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/Form/GenerateFromModulesForm.php
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------
   8 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is
     |         |     Drupal\config_enforce\EnforcedConfig.
 142 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with
     |         |     t() for variables
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...erns/Demo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/Form/AddModuleForm.php
-----------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 3 WARNINGS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------------------------
   9 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is
     |         |     Drupal\config_enforce_devel\TargetModuleBuilder.
  86 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with
     |         |     t() for variables
  86 | ERROR   | [ ] Concatenating translatable strings is not allowed, use placeholders instead and only
     |         |     one string literal
 103 | WARNING | [ ] Only string literals should be passed to t() where possible
 105 | WARNING | [ ] Only string literals should be passed to t() where possible
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/Form/ThemeSettingsFormTrait.php
-----------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------
  73 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
  98 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
 129 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...rupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/Form/GenerateFromActiveStorageForm.php
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 45 | WARNING | Translatable strings must not begin or end with white spaces, use placeholders with t()
    |         | for variables
-----------------------------------------------------------------------------------------------------------


FILE: ...mo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/Form/DevelFormHelperTrait.php
-----------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 10 WARNINGS AFFECTING 15 LINES
-----------------------------------------------------------------------------------------------------------
  25 | ERROR   | [x] Line indented incorrectly; expected 2 spaces, found 3
  26 | ERROR   | [x] Expected 4 space(s) before asterisk; 3 found
  27 | ERROR   | [x] Expected 4 space(s) before asterisk; 3 found
  28 | ERROR   | [x] Expected 4 space(s) before asterisk; 3 found
  29 | ERROR   | [x] Expected 4 space(s) before asterisk; 3 found
 122 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
 209 | WARNING | [ ] Translatable strings must not begin or end with white spaces, use placeholders with
     |         |     t() for variables
 225 | WARNING | [ ] Line exceeds 80 characters; contains 104 characters
 281 | WARNING | [ ] Line exceeds 80 characters; contains 98 characters
 304 | WARNING | [ ] Line exceeds 80 characters; contains 98 characters
 444 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
 499 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters
 619 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
 647 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
 656 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: .../Demo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/TargetModuleCollection.php
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------
  8 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is
    |         |     Drupal\config_enforce\ConfigEnforceHelperTrait.
 24 | WARNING | [ ] Possible useless method overriding detected
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...erns/Demo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/EnforcedConfigFile.php
-----------------------------------------------------------------------------------------------------------
FOUND 10 ERRORS AND 2 WARNINGS AFFECTING 12 LINES
-----------------------------------------------------------------------------------------------------------
  3 | ERROR   | [x] Expected 1 line after declare statement, found 2.
 10 | ERROR   | [ ] Doc comment is empty
 15 | ERROR   | [ ] Missing short description in doc comment
 20 | ERROR   | [ ] Missing short description in doc comment
 25 | ERROR   | [ ] Missing short description in doc comment
 30 | ERROR   | [ ] Missing short description in doc comment
 53 | ERROR   | [ ] Missing parameter type
 56 | ERROR   | [ ] Description for the @return value must be on the next line
 68 | ERROR   | [ ] Missing parameter type
 71 | ERROR   | [ ] Description for the @return value must be on the next line
 84 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
 95 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...rgissue-v9/web/modules/contrib/config_enforce_devel/src/FormHandler/ThemeSettingsFormHandlerTrait.php
-----------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------
 90 | ERROR | [ ] Parameter tags must be grouped together in a doc comment
 95 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 2
 95 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: .../Demo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/EnforcedConfigRegistry.php
-----------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AND 3 WARNINGS AFFECTING 8 LINES
-----------------------------------------------------------------------------------------------------------
  23 | WARNING | Possible useless method overriding detected
  34 | ERROR   | Missing short description in doc comment
  35 | ERROR   | Missing parameter type
  59 | WARNING | Line exceeds 80 characters; contains 92 characters
  81 | ERROR   | Missing parameter type
 108 | WARNING | Line exceeds 80 characters; contains 92 characters
 125 | ERROR   | Missing short description in doc comment
 126 | ERROR   | Missing parameter type
-----------------------------------------------------------------------------------------------------------


FILE: ...emo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/EnforcedConfigCollection.php
-----------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 4 WARNINGS AFFECTING 7 LINES
-----------------------------------------------------------------------------------------------------------
  10 | WARNING | Line exceeds 80 characters; contains 88 characters
  29 | ERROR   | Missing parameter type
  39 | WARNING | Line exceeds 80 characters; contains 105 characters
  56 | WARNING | Line exceeds 80 characters; contains 98 characters
  83 | WARNING | Line exceeds 80 characters; contains 87 characters
  85 | ERROR   | Missing parameter type
 123 | ERROR   | Missing parameter type
-----------------------------------------------------------------------------------------------------------


FILE: ...rns/Demo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/TargetModuleBuilder.php
-----------------------------------------------------------------------------------------------------------
FOUND 8 ERRORS AND 4 WARNINGS AFFECTING 12 LINES
-----------------------------------------------------------------------------------------------------------
  13 | ERROR   | [x] Use statements should be sorted alphabetically. The first wrong one is
     |         |     Drupal\config_enforce\ConfigEnforcer.
  27 | ERROR   | [ ] Missing @var tag in member variable comment
  32 | ERROR   | [ ] Missing @var tag in member variable comment
  37 | ERROR   | [ ] Missing @var tag in member variable comment
  42 | ERROR   | [ ] Missing @var tag in member variable comment
  47 | ERROR   | [ ] Missing @var tag in member variable comment
 183 | ERROR   | [ ] Comment indentation error, expected only 1 spaces
 184 | ERROR   | [ ] Comment indentation error, expected only 3 spaces
 186 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters
 187 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
 239 | WARNING | [ ] Line exceeds 80 characters; contains 88 characters
 243 | WARNING | [ ] Line exceeds 80 characters; contains 92 characters
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...l-orgissue-v9/web/modules/contrib/config_enforce_devel/src/EventSubscriber/ConfigDeleteSubscriber.php
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 10 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
    |       |     Drupal\Core\Config\ConfigCrudEvent.
-----------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------


FILE: ...metInterns/Demo-site/drupal-orgissue-v9/web/modules/contrib/config_enforce_devel/src/TargetModule.php
-----------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
 30 | ERROR | Missing parameter type
-----------------------------------------------------------------------------------------------------------

Time: 1.2 secs; Memory: 14MB

Kindly check and advise.

Thanks,
Jake

kalash-j made their first commit to this issue’s fork.

kalash-j’s picture

Status: Needs work » Needs review
StatusFileSize
new49.56 KB

i have fixed the remaining phpcs issues

a.aaronjake’s picture

Status: Needs review » Needs work

Hi @kalash-j,

MR!19 was applied not-so successfully and it also threw multiple errors

config_enforce_devel git:(1.0.x) ✗ curl https://git.drupalcode.org/project/config_enforce_devel/-/merge_requests/19.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  105k    0  105k    0     0   259k      0 --:--:-- --:--:-- --:--:--  265k
patching file README.md
patching file config_enforce_devel.install
patching file config_enforce_devel.module
patching file css/config-enforce-devel.css
patching file docs/archetypes/default.md
patching file docs/content/_index.md
patching file docs/content/background/best-practices.md
patching file docs/content/how-to/add-config-enforce-to-a-project.md
patching file docs/content/how-to/apply-enforced-configs.md
patching file docs/content/how-to/generate-settings-from-active-storage.md
patching file docs/content/how-to/generate-settings-from-modules.md
patching file docs/content/how-to/simulate-production-deployment.md
patching file docs/content/reference/_index.md
patching file docs/content/reference/security-model.md
patching file docs/content/reference/terminology.md
patching file docs/content/tutorials/basic-usage.md
patching file docs/content/tutorials/getting-started.md
patching file docs/content/tutorials/installation.md
patching file docs/static/css/config-enforce.css
patching file src/ConfigDevelHelper.php
patching file src/EnforcedConfigCollection.php
patching file src/EnforcedConfigFile.php
patching file src/EnforcedConfigRegistry.php
patching file src/EventSubscriber/ConfigDeleteSubscriber.php
patching file src/Form/AddModuleForm.php
patching file src/Form/DevelFormHelperTrait.php
Hunk #1 succeeded at 43 (offset 7 lines).
Hunk #2 succeeded at 93 (offset 7 lines).
Hunk #3 succeeded at 119 (offset 7 lines).
Hunk #4 succeeded at 183 (offset 7 lines).
Hunk #5 succeeded at 200 (offset 7 lines).
Hunk #6 succeeded at 222 (offset 7 lines).
Hunk #7 succeeded at 237 (offset 7 lines).
Hunk #8 succeeded at 278 (offset 7 lines).
Hunk #9 succeeded at 302 (offset 7 lines).
Hunk #10 succeeded at 349 (offset 7 lines).
Hunk #11 succeeded at 365 (offset 7 lines).
Hunk #12 succeeded at 388 (offset 7 lines).
Hunk #13 succeeded at 404 (offset 7 lines).
Hunk #14 succeeded at 427 (offset 7 lines).
Hunk #15 succeeded at 443 (offset 7 lines).
Hunk #16 succeeded at 453 (offset 7 lines).
Hunk #17 succeeded at 499 (offset 7 lines).
Hunk #18 succeeded at 538 (offset 7 lines).
Hunk #19 succeeded at 558 (offset 7 lines).
Hunk #20 succeeded at 581 (offset 7 lines).
Hunk #21 succeeded at 597 (offset 7 lines).
Hunk #22 succeeded at 613 (offset 7 lines).
Hunk #23 succeeded at 647 (offset 7 lines).
patching file src/Form/EmbeddedEnforceForm.php
patching file src/Form/EnforcedConfigs.php
patching file src/Form/GenerateFormBase.php
patching file src/Form/GenerateFromActiveStorageForm.php
patching file src/Form/GenerateFromModulesForm.php
patching file src/Form/ModalEnforceForm.php
patching file src/Form/ModalFormHelperTrait.php
patching file src/Form/SettingsForm.php
patching file src/Form/ThemeSettingsFormTrait.php
patching file src/FormHandler/DevelEnforceFormHandler.php
patching file src/FormHandler/ThemeSettingsFormHandlerTrait.php
patching file src/TargetModule.php
patching file src/TargetModuleBuilder.php
patching file src/TargetModuleCollection.php
patching file src/TargetModuleInstaller.php
patching file src/ToolbarHandler.php
patching file tests/src/Functional/DefaultTargetModuleTest.php
patching file tests/src/Functional/FormAlterImplementationOrderTest.php
➜  config_enforce_devel git:(1.0.x) ✗ cd ..
➜  contrib git:(master) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig config_enforce_devel

FILE: ...b/modules/contrib/config_enforce_devel/src/Form/ThemeSettingsFormTrait.php
--------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------------
  73 | ERROR | [x] Multi-line function declarations must have a trailing comma
     |       |     after the last parameter
  98 | ERROR | [x] Multi-line function declarations must have a trailing comma
     |       |     after the last parameter
 129 | ERROR | [x] Multi-line function declarations must have a trailing comma
     |       |     after the last parameter
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...web/modules/contrib/config_enforce_devel/src/Form/DevelFormHelperTrait.php
--------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------------
 25 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 3
 26 | ERROR | [x] Expected 4 space(s) before asterisk; 3 found
 27 | ERROR | [x] Expected 4 space(s) before asterisk; 3 found
 28 | ERROR | [x] Expected 4 space(s) before asterisk; 3 found
 29 | ERROR | [x] Expected 4 space(s) before asterisk; 3 found
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...v9/web/modules/contrib/config_enforce_devel/src/TargetModuleCollection.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 24 | WARNING | Possible useless method overriding detected
--------------------------------------------------------------------------------


FILE: ...rib/config_enforce_devel/src/FormHandler/ThemeSettingsFormHandlerTrait.php
--------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------
 94 | ERROR | [x] Multi-line function declarations must have a trailing comma
    |       |     after the last parameter
--------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------


FILE: ...v9/web/modules/contrib/config_enforce_devel/src/EnforcedConfigRegistry.php
--------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------
 23 | WARNING | Possible useless method overriding detected
--------------------------------------------------------------------------------

Time: 1.28 secs; Memory: 14MB

Kindly check

Thanks,
Jake

avpaderno’s picture

avpaderno’s picture

Issue summary: View changes

apaderno changed the visibility of the branch 3355523-gitlab-ci-reports to hidden.

star-szr’s picture

Status: Needs work » Closed (outdated)

Thank you for the efforts here folks. No further work is planned for the 1.0.x series other than security fixes and some deprecations and such.

2.0.x is under active development and we plan to fix the phpcs issues there, but this will be taken on by the module maintainers so that it can be done efficiently without a lot of rework needed, and without disrupting the work that the module maintainers are doing across many fronts.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.