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

Primary tabs

Review of the 8.x-1.x branch (commit 39eff00):
  • Your README.txt does not follow best practices (headings need to be uppercase). See https://www.drupal.org/node/2181737 .
    • The INTRODUCTION section is missing.
    • The REQUIREMENTS section is missing.
  • The syslog_report.module does not implement hook_help(). See https://www.drupal.org/docs/develop/documenting-your-project/module-docu... .
  • Bad line endings were found, always use unix style terminators. See https://www.drupal.org/coding-standards#indenting
    ./js/syslog_report.accordion.js:         ASCII text, with CRLF line terminators
    ./css/syslog_report.accordion.css:       ASCII text, with CRLF line terminators
    ./syslog_report.links.menu.yml:          ASCII text, with CRLF line terminators
    ./syslog_report.routing.yml:             ASCII text, with CRLF line terminators
    ./src/Controller/SyslogController.php:   PHP script, ASCII text, with CRLF line terminators
    ./src/Form/SyslogReportSettingsForm.php: PHP script, ASCII text, with CRLF line terminators
    ./src/Form/SyslogReportFilterForm.php:   PHP script, ASCII text, with CRLF line terminators
    ./syslog_report.module:                  PHP script, ASCII text, with CRLF line terminators
    ./templates/syslog-report.html.twig:     HTML document, ASCII text, with CRLF line terminators
    ./syslog_report.libraries.yml:           ASCII text, with CRLF line terminators
    ./syslog_report.info.yml:                ASCII text, with CRLF line terminators
    css/syslog_report.accordion.css
    js/syslog_report.accordion.js
    src/Controller/SyslogController.php
    src/Form/SyslogReportSettingsForm.php
    src/Form/SyslogReportFilterForm.php
    syslog_report.info.yml
    syslog_report.libraries.yml
    syslog_report.links.menu.yml
    syslog_report.module
    syslog_report.routing.yml
    templates/syslog-report.html.twig
    
  • Coder Sniffer has found some issues with your code (please check the Drupal coding standards). See attachment.
  • ESLint has found some issues with your code (please check the JavaScript coding standards).
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 1, col 4, Error - Expected linebreaks to be 'LF' but found 'CRLF'. (linebreak-style)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 2, col 9, Error - Trailing spaces not allowed. (no-trailing-spaces)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 2, col 10, Error - Expected linebreaks to be 'LF' but found 'CRLF'. (linebreak-style)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 3, col 23, Error - Expected linebreaks to be 'LF' but found 'CRLF'. (linebreak-style)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 4, col 4, Error - Expected linebreaks to be 'LF' but found 'CRLF'. (linebreak-style)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 5, col 2, Error - Use the function form of 'use strict'. (strict)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 5, col 16, Error - Expected linebreaks to be 'LF' but found 'CRLF'. (linebreak-style)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 6, col 5, Error - Expected indentation of 2 spaces but found 4. (indent)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 6, col 7, Error - Strings must use singlequote. (quotes)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 6, col 36, Error - Expected linebreaks to be 'LF' but found 'CRLF'. (linebreak-style)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 7, col 9, Error - Expected indentation of 6 spaces but found 8. (indent)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 7, col 17, Error - Strings must use singlequote. (quotes)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 7, col 30, Error - Expected linebreaks to be 'LF' but found 'CRLF'. (linebreak-style)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 8, col 9, Error - Expected indentation of 6 spaces but found 8. (indent)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 8, col 21, Error - Expected linebreaks to be 'LF' but found 'CRLF'. (linebreak-style)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 9, col 8, Error - Expected linebreaks to be 'LF' but found 'CRLF'. (linebreak-style)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/syslog_report.accordion.js: line 10, col 12, Error - Newline required at end of file but not found. (eol-last)
    
    17 problems
    
  • DrupalPractice has found some issues with your code, but could be false positives.
    
    FILE: .../drupal/pareviewsh/pareview_temp/src/Controller/SyslogController.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 5 WARNINGS AFFECTING 5 LINES
    --------------------------------------------------------------------------
     16 | WARNING | \Drupal calls should be avoided in classes, use
        |         | dependency injection instead
     23 | WARNING | Unused variable $resultArr.
     44 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     53 | WARNING | \Drupal calls should be avoided in classes, use
        |         | dependency injection instead
     54 | WARNING | \Drupal calls should be avoided in classes, use
        |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: ...rupal/pareviewsh/pareview_temp/src/Form/SyslogReportSettingsForm.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    --------------------------------------------------------------------------
     36 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     37 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
    --------------------------------------------------------------------------
    
    
    FILE: .../drupal/pareviewsh/pareview_temp/src/Form/SyslogReportFilterForm.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
    --------------------------------------------------------------------------
     28 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     29 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
    --------------------------------------------------------------------------
    
    Time: 120ms; Memory: 4Mb
    
  • 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: ...ndor/drupal/pareviewsh/pareview_temp/css/syslog_report.accordion.css
--------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 8 LINES
--------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but
    |       |     found "\r\n"
  2 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
  5 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
  6 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
  9 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 12 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 13 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 14 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...00000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/README.txt
--------------------------------------------------------------------------
FOUND 1 ERROR AND 4 WARNINGS AFFECTING 5 LINES
--------------------------------------------------------------------------
  2 | WARNING | [ ] Line exceeds 80 characters; contains 84 characters
  3 | WARNING | [ ] Line exceeds 80 characters; contains 96 characters
 11 | WARNING | [ ] Line exceeds 80 characters; contains 123 characters
 14 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
 26 | ERROR   | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...vendor/drupal/pareviewsh/pareview_temp/syslog_report.permissions.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 3 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: .../vendor/drupal/pareviewsh/pareview_temp/syslog_report.links.menu.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 12 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...web/vendor/drupal/pareviewsh/pareview_temp/syslog_report.routing.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 14 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: .../drupal/pareviewsh/pareview_temp/src/Controller/SyslogController.php
--------------------------------------------------------------------------
FOUND 15 ERRORS AND 1 WARNING AFFECTING 13 LINES
--------------------------------------------------------------------------
  1 | ERROR   | [x] End of line character is invalid; expected "\n" but
    |         |     found "\r\n"
  3 | ERROR   | [x] Namespaced classes, interfaces and traits should not
    |         |     begin with a file doc comment
 11 | WARNING | [x] Unused use statement
 13 | ERROR   | [x] Missing class doc comment
 15 | ERROR   | [x] Missing function doc comment
 23 | ERROR   | [x] Short array syntax must be used to define arrays
 26 | ERROR   | [x] Short array syntax must be used to define arrays
 27 | ERROR   | [x] Short array syntax must be used to define arrays
 29 | ERROR   | [x] No space found before comment text; expected "//
    |         |     timestamp to date" but found "//timestamp to date"
 29 | ERROR   | [x] Inline comments must start with a capital letter
 29 | ERROR   | [x] Inline comments must end in full-stops, exclamation
    |         |     marks, colons, question marks, or closing parentheses
 31 | ERROR   | [x] No space found before comment text; expected "//
    |         |     Referer URL" but found "//Referer URL"
 31 | ERROR   | [x] Inline comments must end in full-stops, exclamation
    |         |     marks, colons, question marks, or closing parentheses
 52 | ERROR   | [x] Missing function doc comment
 55 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
 70 | ERROR   | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...rupal/pareviewsh/pareview_temp/src/Form/SyslogReportSettingsForm.php
--------------------------------------------------------------------------
FOUND 13 ERRORS AFFECTING 10 LINES
--------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but
    |       |     found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not
    |       |     begin with a file doc comment
  4 | ERROR | [x] Whitespace found at end of line
  5 | ERROR | [x] Doc comment short description must end with a full stop
 13 | ERROR | [x] Missing class doc comment
 26 | ERROR | [x] Short array syntax must be used to define arrays
 48 | ERROR | [x] No space found before comment text; expected "//
    |       |     Retrieve the configuration" but found "//Retrieve the
    |       |     configuration"
 48 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, colons, question marks, or closing parentheses
 50 | ERROR | [x] No space found before comment text; expected "// set
    |       |     the submitted configuration setting" but found "//set
    |       |     the submitted configuration setting"
 50 | ERROR | [x] Inline comments must start with a capital letter
 50 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, colons, question marks, or closing parentheses
 51 | ERROR | [x] Object operator not indented correctly; expected 6
    |       |     spaces but found 8
 55 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: .../drupal/pareviewsh/pareview_temp/src/Form/SyslogReportFilterForm.php
--------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------
  1 | ERROR | [x] End of line character is invalid; expected "\n" but
    |       |     found "\r\n"
  3 | ERROR | [x] Namespaced classes, interfaces and traits should not
    |       |     begin with a file doc comment
 13 | ERROR | [x] Missing class doc comment
 36 | ERROR | [x] Short array syntax must be used to define arrays
 80 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...1101/web/vendor/drupal/pareviewsh/pareview_temp/syslog_report.module
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
--------------------------------------------------------------------------
 1 | ERROR | [x] Missing file doc comment
 1 | ERROR | [x] End of line character is invalid; expected "\n" but
   |       |     found "\r\n"
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...b/vendor/drupal/pareviewsh/pareview_temp/syslog_report.libraries.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 9 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...01/web/vendor/drupal/pareviewsh/pareview_temp/syslog_report.info.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------
 1 | WARNING | [ ] Remove "project" from the info file, it will be added
   |         |     by drupal.org packaging automatically
 8 | ERROR   | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 338ms; Memory: 4Mb