Review of the 7.x-1.x branch (commit 76a036f):
- README.md or README.txt is missing, see the guidelines for in-project documentation.
- Remove LICENSE.txt, it will be added by drupal.org packaging automatically.
- Remove all .DS_Store files from your repository.
- ./includes/nodeownership.pages.inc: all functions should be prefixed with your module/theme name to avoid name clashes. See https://www.drupal.org/node/318#naming
function _node_claim_process($type, $id) { - Bad line endings were found, always use unix style terminators. See https://www.drupal.org/coding-standards#indenting
./includes/nodeownership.views_default.inc: PHP script, ASCII text, with CRLF line terminators includes/nodeownership.views_default.inc - Remove all old CVS $Id tags, they are not needed anymore.
nodeownership.info:1:; $Id: nodeownership.info,v 1.0 2011/01/26 $ - 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: /var/www/drupal-7-pareview/pareview_temp/nodeownership.module ---------------------------------------------------------------------- FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES ---------------------------------------------------------------------- 153 | WARNING | Unused global variable $user. 160 | WARNING | Unused variable $mail. 228 | WARNING | Unused variable $success. 242 | WARNING | Unused variable $success. ---------------------------------------------------------------------- FILE: /var/www/drupal-7-pareview/pareview_temp/nodeownership.info.inc --------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE --------------------------------------------------------------------------- 6 | WARNING | Class name must be prefixed with the project name | | "Nodeownership" --------------------------------------------------------------------------- FILE: ...view_temp/includes/views_handler_field_nodeownership_approve_link.inc --------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE --------------------------------------------------------------------------- 8 | WARNING | Class name must be prefixed with the project name | | "Nodeownership" --------------------------------------------------------------------------- FILE: ...w/pareview_temp/includes/views_handler_field_nodeownership_status.inc --------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE --------------------------------------------------------------------------- 8 | WARNING | Class name must be prefixed with the project name | | "Nodeownership" --------------------------------------------------------------------------- FILE: ...view_temp/includes/views_handler_field_nodeownership_decline_link.inc --------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE --------------------------------------------------------------------------- 8 | WARNING | Class name must be prefixed with the project name | | "Nodeownership" --------------------------------------------------------------------------- FILE: /var/www/drupal-7-pareview/pareview_temp/includes/nodeownership.inc ------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------- 73 | WARNING | Unused variable $mail. ------------------------------------------------------------------------- FILE: .../www/drupal-7-pareview/pareview_temp/includes/nodeownership.views.inc --------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES --------------------------------------------------------------------------- 14 | WARNING | There must be no blank line following an inline comment 34 | WARNING | There must be no blank line following an inline comment --------------------------------------------------------------------------- FILE: .../pareview_temp/includes/views_handler_filter_nodeownership_status.inc --------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE --------------------------------------------------------------------------- 8 | WARNING | Class name must be prefixed with the project name | | "Nodeownership" --------------------------------------------------------------------------- FILE: .../www/drupal-7-pareview/pareview_temp/includes/nodeownership.pages.inc --------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE --------------------------------------------------------------------------- 48 | WARNING | Unused variable $node_title. --------------------------------------------------------------------------- Time: 308ms; Memory: 12.5Mb - No automated test cases were found, did you consider writing Simpletests or 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. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
FILE: /var/www/drupal-7-pareview/pareview_temp/LICENSE.txt
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
106 | WARNING | Line exceeds 80 characters; contains 81 characters
120 | WARNING | Line exceeds 80 characters; contains 84 characters
227 | WARNING | Line exceeds 80 characters; contains 81 characters
----------------------------------------------------------------------
FILE: /var/www/drupal-7-pareview/pareview_temp/nodeownership.module
---------------------------------------------------------------------------
FOUND 16 ERRORS AND 2 WARNINGS AFFECTING 18 LINES
---------------------------------------------------------------------------
9 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found
10 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found
12 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
21 | ERROR | [ ] Arguments with default values must be at the end of
| | the argument list
49 | WARNING | [x] A comma should follow the last multiline array item.
| | Found: )
119 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
120 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
121 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
137 | ERROR | [x] No space found before comment text; expected "//
| | '#theme' => 'links__node__flag'," but found
| | "//'#theme' => 'links__node__flag',"
156 | ERROR | [x] Inline comments must end in full-stops, exclamation
| | marks, or question marks
165 | WARNING | [ ] Format should be "* Implements hook_foo().", "*
| | Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "*
| | Implements hook_foo_BAR_ID_bar() for
| | xyz-bar.html.twig.", or "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
178 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
179 | ERROR | [x] Expected 1 space(s) before asterisk; 0 found
192 | ERROR | [x] No space found before comment text; expected "// 'uri
| | callback' => 'entity_class_uri'," but found "//'uri
| | callback' => 'entity_class_uri',"
220 | ERROR | [ ] Missing parameter type
222 | ERROR | [ ] Missing parameter type
234 | ERROR | [ ] Missing parameter type
236 | ERROR | [ ] Missing parameter type
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------
FILE: /var/www/drupal-7-pareview/pareview_temp/nodeownership.info.inc
---------------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 4 LINES
---------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
6 | ERROR | [x] Missing class doc comment
8 | ERROR | [x] Missing function doc comment
8 | ERROR | [ ] Variable "entityType" is camel caps format. do not use
| | mixed case (camelCase), use lower case and _
22 | ERROR | [x] Expected 1 newline at end of file; 2 found
22 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------
FILE: /var/www/drupal-7-pareview/pareview_temp/nodeownership.install
---------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
---------------------------------------------------------------------------
14 | ERROR | [x] AS keyword must be lowercase; expected "as" but found
| | "AS"
104 | ERROR | [x] AS keyword must be lowercase; expected "as" but found
| | "AS"
126 | ERROR | [x] Whitespace found at end of line
129 | ERROR | [x] Expected 1 newline at end of file; 2 found
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------
FILE: ...view_temp/includes/views_handler_field_nodeownership_approve_link.inc
---------------------------------------------------------------------------
FOUND 20 ERRORS AFFECTING 8 LINES
---------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
8 | ERROR | [x] Missing class doc comment
8 | ERROR | [ ] Class name must begin with a capital letter
8 | ERROR | [ ] Class name must use UpperCamel naming without
| | underscores
9 | ERROR | [x] Missing function doc comment
9 | ERROR | [ ] Method name
| | "views_handler_field_nodeownership_approve_link::option_definition"
| | is not in lowerCamel format
9 | ERROR | [ ] Visibility must be declared on method
| | "option_definition"
15 | ERROR | [x] Missing function doc comment
15 | ERROR | [ ] Method name
| | "views_handler_field_nodeownership_approve_link::options_form"
| | is not in lowerCamel format
15 | ERROR | [ ] Visibility must be declared on method "options_form"
28 | ERROR | [x] Missing function doc comment
28 | ERROR | [ ] Visibility must be declared on method "render"
34 | ERROR | [x] Missing function doc comment
34 | ERROR | [ ] Method name
| | "views_handler_field_nodeownership_approve_link::render_link"
| | is not in lowerCamel format
34 | ERROR | [ ] Visibility must be declared on method "render_link"
53 | ERROR | [x] Missing function doc comment
53 | ERROR | [ ] Method name
| | "views_handler_field_nodeownership_approve_link::add_self_tokens"
| | is not in lowerCamel format
53 | ERROR | [ ] Visibility must be declared on method "add_self_tokens"
57 | ERROR | [x] Expected 1 newline at end of file; 2 found
57 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------
FILE: ...w/pareview_temp/includes/views_handler_field_nodeownership_status.inc
---------------------------------------------------------------------------
FOUND 8 ERRORS AFFECTING 4 LINES
---------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
8 | ERROR | [x] Missing class doc comment
8 | ERROR | [ ] Class name must begin with a capital letter
8 | ERROR | [ ] Class name must use UpperCamel naming without
| | underscores
9 | ERROR | [x] Missing function doc comment
9 | ERROR | [ ] Visibility must be declared on method "render"
19 | ERROR | [x] Expected 1 newline at end of file; 2 found
19 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------
FILE: ...pal-7-pareview/pareview_temp/includes/nodeownership.views_default.inc
---------------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
---------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
9 | WARNING | [ ] Format should be "* Implements hook_foo().", "*
| | Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "*
| | Implements hook_foo_BAR_ID_bar() for
| | xyz-bar.html.twig.", or "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
14 | ERROR | [x] Calling class constructors must always include
| | parentheses
407 | ERROR | [x] Functions must not contain multiple empty lines in a
| | row; found 2 empty lines
412 | ERROR | [x] Expected 1 newline at end of file; 2 found
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------
FILE: .../www/drupal-7-pareview/pareview_temp/includes/nodeownership.admin.inc
---------------------------------------------------------------------------
FOUND 3 ERRORS AND 4 WARNINGS AFFECTING 7 LINES
---------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
6 | ERROR | [ ] Return type missing for @return tag in function
| | comment
30 | ERROR | [x] Functions must not contain multiple empty lines in a
| | row; found 2 empty lines
38 | WARNING | [ ] Do not concatenate strings to translatable strings,
| | they should be part of the t() argument and you should
| | use placeholders
45 | WARNING | [ ] Do not concatenate strings to translatable strings,
| | they should be part of the t() argument and you should
| | use placeholders
64 | WARNING | [ ] Do not concatenate strings to translatable strings,
| | they should be part of the t() argument and you should
| | use placeholders
83 | WARNING | [ ] Do not concatenate strings to translatable strings,
| | they should be part of the t() argument and you should
| | use placeholders
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------
FILE: ...view_temp/includes/views_handler_field_nodeownership_decline_link.inc
---------------------------------------------------------------------------
FOUND 20 ERRORS AFFECTING 8 LINES
---------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
8 | ERROR | [x] Missing class doc comment
8 | ERROR | [ ] Class name must begin with a capital letter
8 | ERROR | [ ] Class name must use UpperCamel naming without
| | underscores
9 | ERROR | [x] Missing function doc comment
9 | ERROR | [ ] Method name
| | "views_handler_field_nodeownership_decline_link::option_definition"
| | is not in lowerCamel format
9 | ERROR | [ ] Visibility must be declared on method
| | "option_definition"
15 | ERROR | [x] Missing function doc comment
15 | ERROR | [ ] Method name
| | "views_handler_field_nodeownership_decline_link::options_form"
| | is not in lowerCamel format
15 | ERROR | [ ] Visibility must be declared on method "options_form"
28 | ERROR | [x] Missing function doc comment
28 | ERROR | [ ] Visibility must be declared on method "render"
34 | ERROR | [x] Missing function doc comment
34 | ERROR | [ ] Method name
| | "views_handler_field_nodeownership_decline_link::render_link"
| | is not in lowerCamel format
34 | ERROR | [ ] Visibility must be declared on method "render_link"
53 | ERROR | [x] Missing function doc comment
53 | ERROR | [ ] Method name
| | "views_handler_field_nodeownership_decline_link::add_self_tokens"
| | is not in lowerCamel format
53 | ERROR | [ ] Visibility must be declared on method "add_self_tokens"
57 | ERROR | [x] Expected 1 newline at end of file; 2 found
57 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------
FILE: /var/www/drupal-7-pareview/pareview_temp/includes/nodeownership.inc
---------------------------------------------------------------------------
FOUND 7 ERRORS AND 2 WARNINGS AFFECTING 8 LINES
---------------------------------------------------------------------------
32 | ERROR | [ ] If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
56 | ERROR | [ ] If the line declaring an array spans longer than 80
| | characters, each element should be broken into its own
| | line
63 | ERROR | [x] Doc comment short description must end with a full
| | stop
63 | ERROR | [ ] Doc comment short description must be on a single
| | line, further text should be a separate paragraph
79 | WARNING | [ ] Only string literals should be passed to t() where
| | possible
84 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters
86 | ERROR | [ ] Missing parameter type
88 | ERROR | [ ] Missing parameter type
90 | ERROR | [ ] Missing parameter type
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------
FILE: .../www/drupal-7-pareview/pareview_temp/includes/nodeownership.views.inc
---------------------------------------------------------------------------
FOUND 3 ERRORS AND 3 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------
9 | WARNING | [ ] Format should be "* Implements hook_foo().", "*
| | Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "*
| | Implements hook_foo_BAR_ID_bar() for
| | xyz-bar.html.twig.", or "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
9 | ERROR | [x] Doc comment short description must end with a full
| | stop
14 | WARNING | [x] There must be no blank line following an inline
| | comment
34 | WARNING | [x] There must be no blank line following an inline
| | comment
34 | ERROR | [x] Inline comments must end in full-stops, exclamation
| | marks, or question marks
168 | ERROR | [x] Expected 1 newline at end of file; 2 found
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------
FILE: .../pareview_temp/includes/views_handler_filter_nodeownership_status.inc
---------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 5 LINES
---------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
4 | ERROR | [x] Doc comment short description must end with a full stop
8 | ERROR | [x] Missing class doc comment
8 | ERROR | [ ] Class name must begin with a capital letter
8 | ERROR | [ ] Class name must use UpperCamel naming without
| | underscores
13 | ERROR | [ ] Method name
| | "views_handler_filter_nodeownership_status::value_form"
| | is not in lowerCamel format
13 | ERROR | [ ] Visibility must be declared on method "value_form"
28 | ERROR | [x] Expected 1 newline at end of file; 2 found
28 | ERROR | [x] The closing brace for the class must have an empty line
| | before it
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------
FILE: .../www/drupal-7-pareview/pareview_temp/includes/nodeownership.pages.inc
---------------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
---------------------------------------------------------------------------
1 | ERROR | [x] Missing file doc comment
9 | ERROR | [ ] Return comment must be on the next line
38 | ERROR | [ ] Missing parameter type
40 | ERROR | [ ] Missing parameter type
80 | ERROR | [ ] Missing parameter type
82 | ERROR | [ ] Missing parameter type
111 | ERROR | [ ] You must use "/**" style comments for a function
| | comment
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------
FILE: /var/www/drupal-7-pareview/pareview_temp/nodeownership.info
---------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------
11 | ERROR | [ ] It's only necessary to declare files[] if they declare a
| | class or interface.
16 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------
Time: 602ms; Memory: 14.75Mb
Source: http://pareview.sh/ - PAReview.sh online service
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | nodeownership-coder-review-upgrades-2647192-2.patch | 11.46 KB | vinay15 |
Comments
Comment #2
vinay15Resolved some of the issues.
Comment #3
vinay15Comment #4
ashishdalviThanks for the patch.
Comment #5
ashishdalvi