https://git.drupal.org/project/register_preapproved

Primary tabs

Git errors: Review of the 8.x-1.x branch (commit ba988e3):
  • README.md or README.txt is missing, see the guidelines for in-project documentation.
  • ./register_preapproved.module: All functions should be prefixed with your module/theme name (register_preapproved) to avoid name clashes. See https://www.drupal.org/node/318#naming
    function valid_domain($mail) {
    
  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards). See attachment.
  • DrupalPractice has found some issues with your code, but could be false positives.
    
    FILE: ...b/vendor/drupal/pareviewsh/pareview_temp/register_preapproved.module
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     174 | WARNING | Doc comment indicates hook_form_alter() but function
         |         | signature is
         |         | "register_preapproved_form_user_register_form_alter"
         |         | instead of "register_preapproved_form_alter". Did you
         |         | mean hook_form_FORM_ID_alter()?
    --------------------------------------------------------------------------
    
    
    FILE: ...pal/pareviewsh/pareview_temp/includes/register_preapproved.admin.inc
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
    --------------------------------------------------------------------------
     14 | WARNING | All variables defined by your module must be prefixed
        |         | with your module's name to avoid name collisions with
        |         | others. Expected start with "register_preapproved.info"
        |         | but found "register_preapproved_count"
     21 | WARNING | All variables defined by your module must be prefixed
        |         | with your module's name to avoid name collisions with
        |         | others. Expected start with "register_preapproved.info"
        |         | but found "register_preapproved_message"
     29 | WARNING | All variables defined by your module must be prefixed
        |         | with your module's name to avoid name collisions with
        |         | others. Expected start with "register_preapproved.info"
        |         | but found "register_preapproved_restrict"
     46 | WARNING | All variables defined by your module must be prefixed
        |         | with your module's name to avoid name collisions with
        |         | others. Expected start with "register_preapproved.info"
        |         | but found "register_preapproved_roles"
    --------------------------------------------------------------------------
    
    
    FILE: ...vendor/drupal/pareviewsh/pareview_temp/register_preapproved.info.yml
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     8 | WARNING | All dependencies must be prefixed with the project name,
       |         | for example "drupal:"
    --------------------------------------------------------------------------
    
    Time: 754ms; Memory: 6Mb
    
  • No automated test cases were found, did you consider writing PHPUnit tests? This is not a requirement but encouraged for professional software development.
This automated report was generated with PAReview.sh, your friendly project application review script.

FILE: .../vendor/drupal/pareviewsh/pareview_temp/register_preapproved.install
--------------------------------------------------------------------------
FOUND 12 ERRORS AND 1 WARNING AFFECTING 13 LINES
--------------------------------------------------------------------------
  1 | ERROR   | [x] The PHP open tag must be followed by exactly one
    |         |     blank line
  4 | WARNING | [ ] Line exceeds 80 characters; contains 91 characters
  5 | ERROR   | [x] There must be exactly one blank line after the file
    |         |     comment
  9 | ERROR   | [x] Expected 1 blank line before function; 0 found
 10 | ERROR   | [x] Short array syntax must be used to define arrays
 12 | ERROR   | [x] Short array syntax must be used to define arrays
 13 | ERROR   | [x] Short array syntax must be used to define arrays
 19 | ERROR   | [x] Short array syntax must be used to define arrays
 26 | ERROR   | [x] Short array syntax must be used to define arrays
 31 | ERROR   | [x] Short array syntax must be used to define arrays
 38 | ERROR   | [x] Short array syntax must be used to define arrays
 39 | ERROR   | [x] Short array syntax must be used to define arrays
 41 | ERROR   | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...b/vendor/drupal/pareviewsh/pareview_temp/register_preapproved.module
--------------------------------------------------------------------------
FOUND 55 ERRORS AND 4 WARNINGS AFFECTING 40 LINES
--------------------------------------------------------------------------
   1 | ERROR   | [x] The PHP open tag must be followed by exactly one
     |         |     blank line
   4 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
  13 | ERROR   | [x] Equals sign not aligned with surrounding
     |         |     assignments; expected 1 space but found 2 spaces
  13 | ERROR   | [x] Short array syntax must be used to define arrays
  13 | ERROR   | [ ] The $text argument to l() should be enclosed within
     |         |     t() so that it is translatable
  14 | ERROR   | [x] Short array syntax must be used to define arrays
  14 | ERROR   | [ ] The $text argument to l() should be enclosed within
     |         |     t() so that it is translatable
  15 | ERROR   | [x] Case breaking statements must be followed by a
     |         |     single blank line
  17 | ERROR   | [x] Case breaking statements must be followed by a
     |         |     single blank line
  17 | ERROR   | [ ] If the line declaring an array spans longer than 80
     |         |     characters, each element should be broken into its
     |         |     own line
  17 | ERROR   | [x] Short array syntax must be used to define arrays
  17 | ERROR   | [ ] The $text argument to l() should be enclosed within
     |         |     t() so that it is translatable
  17 | ERROR   | [ ] The $text argument to l() should be enclosed within
     |         |     t() so that it is translatable
  19 | ERROR   | [x] Equals sign not aligned with surrounding
     |         |     assignments; expected 1 space but found 2 spaces
  21 | ERROR   | [x] Short array syntax must be used to define arrays
  21 | ERROR   | [ ] The $text argument to l() should be enclosed within
     |         |     t() so that it is translatable
  22 | ERROR   | [x] Case breaking statements must be followed by a
     |         |     single blank line
  32 | ERROR   | [x] Short array syntax must be used to define arrays
  33 | ERROR   | [x] Short array syntax must be used to define arrays
  37 | ERROR   | [x] Short array syntax must be used to define arrays
  49 | ERROR   | [x] Short array syntax must be used to define arrays
  51 | ERROR   | [x] Short array syntax must be used to define arrays
  55 | ERROR   | [x] Short array syntax must be used to define arrays
  56 | ERROR   | [x] Short array syntax must be used to define arrays
  60 | ERROR   | [x] Short array syntax must be used to define arrays
  65 | ERROR   | [x] Short array syntax must be used to define arrays
  68 | ERROR   | [x] Short array syntax must be used to define arrays
  69 | ERROR   | [x] Short array syntax must be used to define arrays
  74 | ERROR   | [x] Short array syntax must be used to define arrays
  77 | ERROR   | [x] Short array syntax must be used to define arrays
  78 | ERROR   | [x] Short array syntax must be used to define arrays
  83 | ERROR   | [x] Short array syntax must be used to define arrays
  86 | ERROR   | [x] Short array syntax must be used to define arrays
  87 | ERROR   | [x] Short array syntax must be used to define arrays
  93 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
  93 | ERROR   | [x] Inline comments must start with a capital letter
  93 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
  94 | ERROR   | [x] Short array syntax must be used to define arrays
  97 | ERROR   | [x] Short array syntax must be used to define arrays
  98 | ERROR   | [x] Short array syntax must be used to define arrays
 127 | ERROR   | [x] Inline comments must start with a capital letter
 127 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
 133 | ERROR   | [x] Inline comments must start with a capital letter
 133 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
 136 | ERROR   | [x] Inline comments must start with a capital letter
 136 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
 138 | ERROR   | [x] Inline comments must start with a capital letter
 138 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
 148 | ERROR   | [x] Inline comments must start with a capital letter
 148 | ERROR   | [x] Inline comments must end in full-stops, exclamation
     |         |     marks, colons, question marks, or closing
     |         |     parentheses
 150 | WARNING | [ ] Only string literals should be passed to t() where
     |         |     possible
 150 | ERROR   | [x] Short array syntax must be used to define arrays
 158 | ERROR   | [x] Doc comment short description must end with a full
     |         |     stop
 158 | ERROR   | [ ] Doc comment short description must be on a single
     |         |     line, further text should be a separate paragraph
 160 | ERROR   | [ ] Missing parameter type
 163 | ERROR   | [x] Expected "bool" but found "boolean" for function
     |         |     return type
 163 | ERROR   | [ ] Description for the @return value is missing
 196 | WARNING | [ ] Only string literals should be passed to t() where
     |         |     possible
 196 | ERROR   | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 46 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...pal/pareviewsh/pareview_temp/includes/register_preapproved.admin.inc
--------------------------------------------------------------------------
FOUND 87 ERRORS AFFECTING 65 LINES
--------------------------------------------------------------------------
   1 | ERROR | [x] The PHP open tag must be followed by exactly one blank
     |       |     line
  11 | ERROR | [x] Short array syntax must be used to define arrays
  15 | ERROR | [x] Short array syntax must be used to define arrays
  18 | ERROR | [x] Short array syntax must be used to define arrays
  26 | ERROR | [x] Short array syntax must be used to define arrays
  43 | ERROR | [x] Short array syntax must be used to define arrays
  46 | ERROR | [x] Short array syntax must be used to define arrays
  57 | ERROR | [x] Doc comment short description must end with a full
     |       |     stop
  57 | ERROR | [ ] Doc comment short description must be on a single
     |       |     line, further text should be a separate paragraph
  62 | ERROR | [x] Short array syntax must be used to define arrays
  63 | ERROR | [ ] If the line declaring an array spans longer than 80
     |       |     characters, each element should be broken into its own
     |       |     line
  63 | ERROR | [x] Short array syntax must be used to define arrays
  64 | ERROR | [x] Short array syntax must be used to define arrays
  65 | ERROR | [x] Short array syntax must be used to define arrays
  66 | ERROR | [x] Short array syntax must be used to define arrays
  67 | ERROR | [x] Short array syntax must be used to define arrays
  79 | ERROR | [x] Short array syntax must be used to define arrays
  83 | ERROR | [x] Short array syntax must be used to define arrays
  84 | ERROR | [x] Short array syntax must be used to define arrays
 101 | ERROR | [x] Inline comments must end in full-stops, exclamation
     |       |     marks, colons, question marks, or closing parentheses
 102 | ERROR | [x] Short array syntax must be used to define arrays
 104 | ERROR | [ ] If the line declaring an array spans longer than 80
     |       |     characters, each element should be broken into its own
     |       |     line
 104 | ERROR | [x] Short array syntax must be used to define arrays
 111 | ERROR | [x] No space found before comment text; expected "// Build
     |       |     the tableselect." but found "//Build the tableselect."
 112 | ERROR | [x] Short array syntax must be used to define arrays
 119 | ERROR | [x] Short array syntax must be used to define arrays
 120 | ERROR | [x] Short array syntax must be used to define arrays
 127 | ERROR | [x] Doc comment short description must end with a full
     |       |     stop
 127 | ERROR | [ ] Doc comment short description must be on a single
     |       |     line, further text should be a separate paragraph
 140 | ERROR | [x] Doc comment short description must end with a full
     |       |     stop
 140 | ERROR | [ ] Doc comment short description must be on a single
     |       |     line, further text should be a separate paragraph
 152 | ERROR | [x] Short array syntax must be used to define arrays
 157 | ERROR | [x] Doc comment short description must end with a full
     |       |     stop
 157 | ERROR | [ ] Doc comment short description must be on a single
     |       |     line, further text should be a separate paragraph
 162 | ERROR | [x] Short array syntax must be used to define arrays
 169 | ERROR | [x] Short array syntax must be used to define arrays
 172 | ERROR | [x] Inline comments must start with a capital letter
 172 | ERROR | [x] Inline comments must end in full-stops, exclamation
     |       |     marks, colons, question marks, or closing parentheses
 174 | ERROR | [x] Inline comments must start with a capital letter
 174 | ERROR | [x] Inline comments must end in full-stops, exclamation
     |       |     marks, colons, question marks, or closing parentheses
 176 | ERROR | [x] Inline comments must start with a capital letter
 176 | ERROR | [x] Inline comments must end in full-stops, exclamation
     |       |     marks, colons, question marks, or closing parentheses
 181 | 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] Doc comment short description must end with a full
     |       |     stop
 196 | ERROR | [ ] Doc comment short description must be on a single
     |       |     line, further text should be a separate paragraph
 201 | ERROR | [x] Short array syntax must be used to define arrays
 203 | ERROR | [x] Inline comments must end in full-stops, exclamation
     |       |     marks, colons, question marks, or closing parentheses
 208 | ERROR | [x] Short array syntax must be used to define arrays
 210 | ERROR | [x] Inline comments must start with a capital letter
 223 | ERROR | [x] Short array syntax must be used to define arrays
 236 | ERROR | [x] Doc comment short description must end with a full
     |       |     stop
 236 | ERROR | [ ] Doc comment short description must be on a single
     |       |     line, further text should be a separate paragraph
 242 | ERROR | [x] Short array syntax must be used to define arrays
 246 | ERROR | [x] Inline comments must start with a capital letter
 246 | ERROR | [x] Inline comments must end in full-stops, exclamation
     |       |     marks, colons, question marks, or closing parentheses
 250 | ERROR | [x] Inline comments must start with a capital letter
 250 | ERROR | [x] Inline comments must end in full-stops, exclamation
     |       |     marks, colons, question marks, or closing parentheses
 254 | ERROR | [x] Inline comments must start with a capital letter
 254 | ERROR | [x] Inline comments must end in full-stops, exclamation
     |       |     marks, colons, question marks, or closing parentheses
 275 | ERROR | [x] Short array syntax must be used to define arrays
 278 | ERROR | [x] Inline comments must start with a capital letter
 278 | ERROR | [x] Inline comments must end in full-stops, exclamation
     |       |     marks, colons, question marks, or closing parentheses
 280 | ERROR | [x] Short array syntax must be used to define arrays
 288 | ERROR | [x] Doc comment short description must end with a full
     |       |     stop
 288 | ERROR | [ ] Doc comment short description must be on a single
     |       |     line, further text should be a separate paragraph
 299 | ERROR | [x] Short array syntax must be used to define arrays
 303 | ERROR | [x] Short array syntax must be used to define arrays
 316 | ERROR | [x] Doc comment short description must end with a full
     |       |     stop
 316 | ERROR | [ ] Doc comment short description must be on a single
     |       |     line, further text should be a separate paragraph
 321 | ERROR | [x] Short array syntax must be used to define arrays
 323 | ERROR | [x] Inline comments must start with a capital letter
 323 | ERROR | [x] Inline comments must end in full-stops, exclamation
     |       |     marks, colons, question marks, or closing parentheses
 326 | ERROR | [x] Inline comments must start with a capital letter
 326 | ERROR | [x] Inline comments must end in full-stops, exclamation
     |       |     marks, colons, question marks, or closing parentheses
 331 | ERROR | [x] Short array syntax must be used to define arrays
 333 | ERROR | [x] Short array syntax must be used to define arrays
 340 | ERROR | [x] Short array syntax must be used to define arrays
 341 | ERROR | [x] Short array syntax must be used to define arrays
 342 | ERROR | [x] Short array syntax must be used to define arrays
 349 | ERROR | [x] Doc comment short description must end with a full
     |       |     stop
 349 | ERROR | [ ] Doc comment short description must be on a single
     |       |     line, further text should be a separate paragraph
 355 | ERROR | [x] Inline comments must start with a capital letter
 355 | ERROR | [x] Inline comments must end in full-stops, exclamation
     |       |     marks, colons, question marks, or closing parentheses
 359 | ERROR | [x] Inline comments must start with a capital letter
 359 | ERROR | [x] Inline comments must end in full-stops, exclamation
     |       |     marks, colons, question marks, or closing parentheses
 368 | ERROR | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 76 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 1.19 secs; Memory: 6Mb