Fix the issues reported by PHP_CodeSniffer

Created on 23 January 2023, almost 2 years ago
Updated 6 June 2024, 7 months ago

FILE: ..._site_name_dird94\web\modules\contentimport\contentimport.module
----------------------------------------------------------------------
FOUND 16 ERRORS AFFECTING 16 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
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"
424 | ERROR | [ ] The array declaration extends to column 88 (the
| | limit is 80). The array content should be split up
| | over multiple lines
453 | ERROR | [ ] The array declaration extends to column 114 (the
| | limit is 80). The array content should be split up
| | over multiple lines
462 | ERROR | [ ] The array declaration extends to column 122 (the
| | limit is 80). The array content should be split up
| | over multiple lines
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

FILE: ...ocs\my_site_name_dird94\web\modules\contentimport\css\custom.css
----------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
9 | ERROR | [x] Expected 1 newline at end of file; 2 found
10 | ERROR | [x] Additional whitespace found at end of file
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------

๐Ÿ› Bug report
Status

Needs work

Version

9.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia Raghavendra A M

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Raghavendra A M
  • First commit to issue fork.
  • Status changed to Needs review almost 2 years ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia _pratik_ Banglore
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia dev16.addweb

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

  • Status changed to Needs work 7 months ago
  • ๐Ÿ‡ต๐Ÿ‡ญPhilippines paraderojether

    Hi
    I reviewed MR!7 and there are still remaining issues reported by phpcs show below:

    contrib phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig contentimport
    
    FILE: /Users/jetherparadero/Q2_DO/q2_issues/web/modules/contrib/contentimport/contentimport.module
    --------------------------------------------------------------------------------------------------
    FOUND 3 ERRORS AND 1 WARNING AFFECTING 3 LINES
    --------------------------------------------------------------------------------------------------
     312 | ERROR   | [x] Whitespace found at end of line
     315 | ERROR   | [x] Expected 1 space before "?"; 0 found
     315 | ERROR   | [x] Expected 1 space before ":"; 0 found
     317 | WARNING | [x] A comma should follow the last multiline array item. Found: $path_data
    --------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------
    
    Time: 296ms; Memory: 14MB
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น
  • ๐Ÿ‡ฎ๐Ÿ‡นItaly apaderno Brescia, ๐Ÿ‡ฎ๐Ÿ‡น

    The 8.x-9.x branch is no longer supported.

Production build 0.71.5 2024