- Issue created by @apaderno
- Merge request !9Issue #3452892: Enable GitLab CI and fix the issues reported by PHP_CodeSniffer → (Open) created by apaderno
- Status changed to Needs work
6 months ago 8:23am 6 June 2024
GitLab CI must be enabled for the project, and the PHP_CodeSniffer warnings/errors fixed.
FILE: ...452892/web/modules/custom/contentimport-3452892/src/Form/ContentImport.php -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 9 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\Core\Ajax\AjaxResponse. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...port-3452892/web/modules/custom/contentimport-3452892/contentimport.module -------------------------------------------------------------------------------- FOUND 17 ERRORS AND 1 WARNING AFFECTING 17 LINES -------------------------------------------------------------------------------- 9 | ERROR | [x] Use statements should be sorted alphabetically. The first | | wrong one is Drupal\file\Entity\File. | | (SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses.IncorrectlyOrderedUses) 30 | ERROR | [ ] All functions defined in a module file must be prefixed | | with the module's name, found "get_fields" but expected | | "contentimport_get_fields" | | (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix) 46 | ERROR | [ ] All functions defined in a module file must be prefixed | | with the module's name, found "get_term_reference" but | | expected "contentimport_get_term_reference" | | (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix) 69 | ERROR | [ ] All functions defined in a module file must be prefixed | | with the module's name, found "create_voc" but expected | | "contentimport_create_voc" | | (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix) 83 | ERROR | [ ] All functions defined in a module file must be prefixed | | with the module's name, found "create_term" but expected | | "contentimport_create_term" | | (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix) 98 | ERROR | [ ] All functions defined in a module file must be prefixed | | with the module's name, found "get_term_id" but expected | | "contentimport_get_term_id" | | (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix) 113 | ERROR | [ ] All functions defined in a module file must be prefixed | | with the module's name, found "get_node_id" but expected | | "contentimport_get_node_id" | | (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix) 131 | ERROR | [ ] All functions defined in a module file must be prefixed | | with the module's name, found "get_user_id" but expected | | "contentimport_get_user_id" | | (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix) 144 | ERROR | [ ] All functions defined in a module file must be prefixed | | with the module's name, found "get_user_info" but expected | | "contentimport_get_user_info" | | (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix) 187 | ERROR | [ ] All functions defined in a module file must be prefixed | | with the module's name, found "node_exists" but expected | | "contentimport_node_exists" | | (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix) 199 | ERROR | [ ] All functions defined in a module file must be prefixed | | with the module's name, found "error_message" but expected | | "contentimport_error_message" | | (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix) 211 | ERROR | [ ] All functions defined in a module file must be prefixed | | with the module's name, found "import_success" but | | expected "contentimport_import_success" | | (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix) 221 | ERROR | [ ] All functions defined in a module file must be prefixed | | with the module's name, found "import_node" but expected | | "contentimport_import_node" | | (Drupal.NamingConventions.ValidFunctionName.InvalidPrefix) 312 | ERROR | [x] Whitespace found at end of line | | (Squiz.WhiteSpace.SuperfluousWhitespace.EndLine) 315 | ERROR | [x] Expected 1 space before "?"; 0 found | | (Squiz.WhiteSpace.OperatorSpacing.NoSpaceBefore) 315 | ERROR | [x] Expected 1 space before ":"; 0 found | | (Squiz.WhiteSpace.OperatorSpacing.NoSpaceBefore) 317 | WARNING | [x] A comma should follow the last multiline array item. | | Found: $path_data (Drupal.Arrays.Array.CommaLastItem) 475 | ERROR | [ ] The array declaration extends to column 122 (the limit is | | 120). The array content should be split up over multiple | | lines (Drupal.Arrays.Array.LongLineDeclaration) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- Time: 171ms; Memory: 8MB
Needs work
10.0
Code