https://git.drupal.org/project/social_media.git 8.x-1.x

Primary tabs

Review of the 8.x-1.x branch (commit 9460bef):
  • 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 INSTALLATION section is missing.
    • The CONFIGURATION section is missing.
  • The social_media.module does not implement hook_help(). See https://www.drupal.org/docs/develop/documenting-your-project/module-docu... .
  • 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/facebook.js: line 14, col 9, Error - Split 'var' declarations into multiple statements. (one-var)
    /var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/js/facebook.js: line 20, col 18, Error - Strings must use singlequote. (quotes)
    
    2 problems
    
  • DrupalPractice has found some issues with your code, but could be false positives.
    
    FILE: ...review_temp/src/Plugin/Field/FieldFormatter/SocialMediaFormatter.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     60 | WARNING | \Drupal calls should be avoided in classes, use
        |         | dependency injection instead
    --------------------------------------------------------------------------
    
    
    FILE: ...wsh/pareview_temp/src/Plugin/Field/FieldWidget/SocialMediaWidget.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 2 LINES
    --------------------------------------------------------------------------
     38 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     52 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
     52 | WARNING | t() calls should be avoided in classes, use dependency
        |         | injection and $this->t() instead
    --------------------------------------------------------------------------
    
    
    FILE: ...vendor/drupal/pareviewsh/pareview_temp/src/Form/ForwardEmailForm.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     148 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
    --------------------------------------------------------------------------
    
    
    FILE: ...or/drupal/pareviewsh/pareview_temp/src/Form/SocialMediaAdminForm.php
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 12 WARNINGS AFFECTING 12 LINES
    --------------------------------------------------------------------------
      70 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
      77 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     106 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     118 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     125 | WARNING | #options values usually have to run through t() for
         |         | translation
     133 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     141 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     149 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     156 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     165 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     173 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
     180 | WARNING | t() calls should be avoided in classes, use dependency
         |         | injection and $this->t() instead
    --------------------------------------------------------------------------
    
    
    FILE: .../web/vendor/drupal/pareviewsh/pareview_temp/social_media.routing.yml
    --------------------------------------------------------------------------
    FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
    --------------------------------------------------------------------------
     17 | WARNING | Open page callback found, please add a comment before the
        |         | line why there is no access restriction
    --------------------------------------------------------------------------
    
    Time: 1.21 secs; 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: ...1101/web/vendor/drupal/pareviewsh/pareview_temp/css/social_media.css
--------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 9 LINES
--------------------------------------------------------------------------
  1 | ERROR | [x] Expected 1 space before opening brace of class
    |       |     definition; 0 found
  2 | ERROR | [x] Expected 1 space after colon in style definition; 0
    |       |     found
  5 | ERROR | [x] Expected 1 space after colon in style definition; 0
    |       |     found
 10 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
 11 | 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
 19 | ERROR | [x] Expected 1 space after colon in style definition; 0
    |       |     found
 20 | ERROR | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...00000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/README.txt
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------
 10 | WARNING | Line exceeds 80 characters; contains 82 characters
--------------------------------------------------------------------------


FILE: ...e1101/web/vendor/drupal/pareviewsh/pareview_temp/social_media.module
--------------------------------------------------------------------------
FOUND 6 ERRORS AND 1 WARNING AFFECTING 7 LINES
--------------------------------------------------------------------------
  6 | ERROR   | [x] There must be exactly one blank line after the file
    |         |     comment
 12 | ERROR   | [x] Expected 1 blank line before function; 2 found
 13 | ERROR   | [x] Short array syntax must be used to define arrays
 14 | ERROR   | [x] Short array syntax must be used to define arrays
 15 | ERROR   | [x] Short array syntax must be used to define arrays
 19 | WARNING | [x] A comma should follow the last multiline array item.
    |         |     Found: )
 36 | ERROR   | [x] Expected 1 newline at end of file; 0 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...eviewsh/pareview_temp/src/Plugin/Field/FieldType/SocialMediaItem.php
--------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------
 26 | ERROR | [x] Expected 1 space before opening brace; found 2
 61 | ERROR | [x] Expected 1 blank line after function; 2 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...review_temp/src/Plugin/Field/FieldFormatter/SocialMediaFormatter.php
--------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------
 24 | ERROR | [x] Expected 1 space before implements keyword; 2 found
 24 | ERROR | [x] Expected 1 space before opening brace; found 2
 48 | ERROR | [x] Expected 1 blank line after function; 0 found
 59 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
 61 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
 62 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
 62 | ERROR | [x] Inline comments must end in full-stops, exclamation
    |       |     marks, colons, question marks, or closing parentheses
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...wsh/pareview_temp/src/Plugin/Field/FieldWidget/SocialMediaWidget.php
--------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------
 62 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
 63 | ERROR | [x] Array indentation error, expected 6 spaces but found 8
 64 | ERROR | [x] Array closing indentation error, expected 4 spaces but
    |       |     found 6
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...pal/pareviewsh/pareview_temp/src/Plugin/Block/SocialSharingBlock.php
--------------------------------------------------------------------------
FOUND 12 ERRORS AND 1 WARNING AFFECTING 11 LINES
--------------------------------------------------------------------------
  82 | ERROR   | [x] Short array syntax must be used to define arrays
  86 | ERROR   | [x] Inline comments must start with a capital letter
  94 | ERROR   | [x] Inline comments must start with a capital letter
 105 | ERROR   | [x] Short array syntax must be used to define arrays
 136 | ERROR   | [x] Inline comments must start with a capital letter
 141 | ERROR   | [x] Short array syntax must be used to define arrays
 146 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: $settings
 157 | ERROR   | [x] No space found before comment text; expected "//
     |         |     dsm($build);" but found "//dsm($build);"
 161 | ERROR   | [x] Missing function doc comment
 170 | ERROR   | [x] Missing function doc comment
 170 | ERROR   | [ ] Protected method name
     |         |     "SocialSharingBlock::social_media_convert_attributes"
     |         |     is not in lowerCamel format
 183 | ERROR   | [x] Missing function doc comment
 183 | ERROR   | [ ] Protected method name
     |         |     "SocialSharingBlock::social_media_convert_drupalSettings"
     |         |     is not in lowerCamel format
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 11 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...endor/drupal/pareviewsh/pareview_temp/src/Event/SocialMediaEvent.php
--------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 5 LINES
--------------------------------------------------------------------------
  8 | ERROR | [x] Doc comment short description must end with a full stop
 12 | ERROR | [ ] Missing short description in doc comment
 13 | ERROR | [x] Expected "array" but found "array." for @var tag in
    |       |     member variable comment
 26 | ERROR | [x] There must be exactly one blank line before the tags in
    |       |     a doc comment
 26 | ERROR | [x] Expected "array" but found "array()" for function
    |       |     return type
 26 | ERROR | [ ] Description for the @return value is missing
 32 | ERROR | [ ] Doc comment is empty
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...vendor/drupal/pareviewsh/pareview_temp/src/Form/ForwardEmailForm.php
--------------------------------------------------------------------------
FOUND 4 ERRORS AND 4 WARNINGS AFFECTING 8 LINES
--------------------------------------------------------------------------
  17 | ERROR   | [x] Additional blank lines found at end of doc comment
  30 | ERROR   | [x] Doc comment short description must end with a full
     |         |     stop
 110 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 117 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 122 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 131 | WARNING | [ ] Possible useless method overriding detected
 154 | ERROR   | [x] Expected 1 blank line after function; 0 found
 155 | ERROR   | [x] The closing brace for the class must have an empty
     |         |     line before it
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...or/drupal/pareviewsh/pareview_temp/src/Form/SocialMediaAdminForm.php
--------------------------------------------------------------------------
FOUND 34 ERRORS AND 11 WARNINGS AFFECTING 31 LINES
--------------------------------------------------------------------------
  15 | ERROR   | [x] Additional blank lines found at end of doc comment
  29 | ERROR   | [x] Multi-line function declarations must define one
     |         |     parameter per line
  68 | ERROR   | [x] Short array syntax must be used to define arrays
  70 | ERROR   | [x] Short array syntax must be used to define arrays
  77 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
  94 | ERROR   | [x] Expected 1 space after IF keyword; 0 found
  94 | ERROR   | [x] Expected 1 space after closing parenthesis; found 0
  98 | ERROR   | [x] Concat operator must be surrounded by a single space
  98 | ERROR   | [x] Concat operator must be surrounded by a single space
  98 | ERROR   | [x] Short array syntax must be used to define arrays
 106 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 110 | ERROR   | [x] Expected one space after the comma, 0 found
 112 | ERROR   | [x] Expected 1 space before "?"; 0 found
 112 | ERROR   | [x] Expected 1 space after "?"; 0 found
 112 | ERROR   | [x] Expected 1 space before ":"; 0 found
 112 | ERROR   | [x] Expected 1 space after ":"; 0 found
 115 | ERROR   | [x] Concat operator must be surrounded by a single space
 115 | ERROR   | [x] Concat operator must be surrounded by a single space
 115 | ERROR   | [x] Short array syntax must be used to define arrays
 116 | ERROR   | [x] Array closing indentation error, expected 12 spaces
     |         |     but found 13
 117 | ERROR   | [x] Array closing indentation error, expected 10 spaces
     |         |     but found 12
 118 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 125 | ERROR   | [x] Short array syntax must be used to define arrays
 133 | ERROR   | [ ] Concatenating translatable strings is not allowed,
     |         |     use placeholders instead and only one string literal
 134 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 141 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 143 | ERROR   | [x] Functions must not contain multiple empty lines in a
     |         |     row; found 2 empty lines
 149 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 156 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 161 | ERROR   | [x] Short array syntax must be used to define arrays
 161 | ERROR   | [x] The first index in a multi-value array must be on a
     |         |     new line
 161 | ERROR   | [x] Short array syntax must be used to define arrays
 162 | ERROR   | [x] Array indentation error, expected 10 spaces but
     |         |     found 12
 162 | ERROR   | [x] Short array syntax must be used to define arrays
 163 | ERROR   | [x] Array closing indentation error, expected 8 spaces
     |         |     but found 10
 163 | ERROR   | [x] Closing parenthesis of array declaration must be on
     |         |     a new line
 165 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 173 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 181 | ERROR   | [ ] Concatenating translatable strings is not allowed,
     |         |     use placeholders instead and only one string literal
 181 | WARNING | [x] A comma should follow the last multiline array item.
     |         |     Found: )
 190 | WARNING | [ ] Possible useless method overriding detected
 244 | ERROR   | [ ] Missing short description in doc comment
 246 | ERROR   | [x] Expected "mixed" but found "type" for function
     |         |     return type
 246 | ERROR   | [ ] Description for the @return value is missing
 249 | ERROR   | [x] Short array syntax must be used to define arrays
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 40 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


FILE: ...1101/web/vendor/drupal/pareviewsh/pareview_temp/social_media.api.php
--------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 12 LINES
--------------------------------------------------------------------------
 10 | ERROR | [ ] Class name must begin with a capital letter
 19 | ERROR | [x] Short array syntax must be used to define arrays
 20 | ERROR | [x] Short array syntax must be used to define arrays
 21 | ERROR | [x] Short array syntax must be used to define arrays
 22 | ERROR | [x] Short array syntax must be used to define arrays
 25 | ERROR | [x] Expected 1 blank line after function; 2 found
 31 | ERROR | [x] Additional blank lines found at end of doc comment
 41 | ERROR | [x] Additional blank lines found at end of doc comment
 42 | ERROR | [ ] Public method name
    |       |     "socialMediaSubscriber::pre_executeSocialMedia" is not
    |       |     in lowerCamel format
 46 | ERROR | [x] Expected 1 blank line after function; 2 found
 52 | ERROR | [x] Additional blank lines found at end of doc comment
 53 | ERROR | [ ] Public method name
    |       |     "socialMediaSubscriber::pre_rednerSocialMedia" is not
    |       |     in lowerCamel format
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------


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


FILE: ...eb/vendor/drupal/pareviewsh/pareview_temp/social_media.libraries.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: ...101/web/vendor/drupal/pareviewsh/pareview_temp/social_media.info.yml
--------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------
 9 | ERROR | [x] Expected 1 newline at end of file; 2 found
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 1.94 secs; Memory: 6Mb