Fix the issues reported by phpcs

Created on 16 May 2023, over 1 year ago
Updated 11 September 2023, about 1 year ago

Problem/Motivation

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\safedelete\config\install\safedelete.settings.yml
-------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------
6 | ERROR | [x] Expected 1 newline at end of file; 3 found
-------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\safedelete\css\safedelete.css
-----------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
17 | ERROR | [x] Expected 1 newline at end of file; 0 found
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\safedelete\safedelete.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: C:\xampp\htdocs\backendassignment\web\modules\contrib\safedelete\safedelete.module
------------------------------------------------------------------------------------------------------------------------
FOUND 199 ERRORS AND 43 WARNINGS AFFECTING 153 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
15 | WARNING | [x] Unused use statement
16 | WARNING | [x] Unused use statement
19 | WARNING | [x] Unused use statement
20 | WARNING | [x] Unused use statement
22 | WARNING | [x] Unused use statement
23 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
29 | ERROR | [x] Expected 1 blank line before function; 2 found
31 | ERROR | [x] Expected one space after the comma, 0 found
32 | ERROR | [x] Expected 1 blank line after function; 2 found
36 | 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.", "* Implements hook_foo_BAR_ID_bar()
| | for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
37 | ERROR | [ ] Doc comment short description must be on a single line, further text should be a separate
| | paragraph
46 | ERROR | [x] Expected 1 blank line after function; 2 found
63 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
63 | ERROR | [x] Object operator not indented correctly; expected 6 spaces but found 4
64 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
64 | ERROR | [x] Space found before comma in argument list
65 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 4
67 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
77 | WARNING | [ ] Line exceeds 80 characters; contains 105 characters
77 | ERROR | [x] Inline comments must start with a capital letter
77 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
77 | ERROR | [x] Comments may not appear after statements
83 | ERROR | [x] Expected 1 space after "="; 2 found
87 | ERROR | [x] There should be no white space after an opening "("
87 | ERROR | [x] Space found before comma in argument list
92 | ERROR | [x] There should be no white space after an opening "("
94 | ERROR | [x] There should be no white space after an opening "("
101 | ERROR | [x] Space before opening parenthesis of function call prohibited
101 | ERROR | [x] There should be no white space after an opening "("
101 | ERROR | [x] Space found before comma in argument list
101 | ERROR | [x] There should be no white space before a closing ")"
105 | ERROR | [x] Expected 1 space after "="; 2 found
109 | ERROR | [x] There should be no white space before a closing ")"
113 | ERROR | [x] There should be no white space after an opening "("
113 | ERROR | [x] Space found before comma in argument list
115 | ERROR | [x] There should be no white space after an opening "("
117 | ERROR | [x] There should be no white space after an opening "("
124 | ERROR | [x] Space before opening parenthesis of function call prohibited
124 | ERROR | [x] There should be no white space after an opening "("
124 | ERROR | [x] Space found before comma in argument list
124 | ERROR | [x] There should be no white space before a closing ")"
128 | ERROR | [x] Expected 1 space after "="; 2 found
132 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
133 | ERROR | [x] There should be no white space after an opening "("
133 | ERROR | [x] There should be no white space before a closing ")"
134 | ERROR | [x] No space found before comment text; expected "// current editing content has embedded file(s)" but
| | found "//current editing content has embedded file(s)"
134 | ERROR | [x] Inline comments must start with a capital letter
136 | ERROR | [x] Space before opening parenthesis of function call prohibited
136 | ERROR | [x] There should be no white space after an opening "("
136 | ERROR | [x] Space found before comma in argument list
136 | ERROR | [x] There should be no white space before a closing ")"
137 | WARNING | [ ] Line exceeds 80 characters; contains 139 characters
137 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
139 | WARNING | [ ] Unused variable $difcount.
140 | WARNING | [ ] Line exceeds 80 characters; contains 137 characters
140 | WARNING | [x] 'TO-DO: if we change the file usage defintion, we count m file usage for the same file is embedded
| | into the same content' should match the format '@todo Fix problem X here.'
140 | ERROR | [x] No space found before comment text; expected "// TO-DO: if we change the file usage defintion, we
| | count m file usage for the same file is embedded into the same content" but found "//TO-DO: if we
| | change the file usage defintion, we count m file usage for the same file is embedded into the same
| | content"
140 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
143 | ERROR | [x] No space found before comment text; expected "// new media reference" but found "//new media
| | reference"
143 | ERROR | [x] Inline comments must start with a capital letter
144 | ERROR | [x] No space found before comment text; expected "// Assumption: only add the file once" but found
| | "//Assumption: only add the file once"
144 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
149 | WARNING | [ ] There must be no blank line following an inline comment
151 | ERROR | [x] There should be no white space before a closing ")"
153 | ERROR | [x] Space before opening parenthesis of function call prohibited
153 | ERROR | [x] There should be no white space after an opening "("
153 | ERROR | [x] Space found before comma in argument list
154 | ERROR | [x] No space found before comment text; expected "// Assumption: only remove the file once" but found
| | "//Assumption: only remove the file once"
155 | WARNING | [x] 'ToDo: Change the logic as a loop with count- $refcount' should match the format '@todo Fix
| | problem X here.'
155 | ERROR | [x] No space found before comment text; expected "// ToDo: Change the logic as a loop with count-
| | $refcount" but found "//ToDo: Change the logic as a loop with count- $refcount"
155 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
163 | ERROR | [x] There should be no white space after an opening "{"
163 | ERROR | [x] Inline comments must start with a capital letter
163 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
163 | ERROR | [x] Comments may not appear after statements
165 | ERROR | [x] Inline comments must start with a capital letter
165 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
177 | ERROR | [x] Expected 1 blank line after function; 2 found
211 | ERROR | [x] Expected 1 blank line after function; 2 found
218 | WARNING | [ ] Unused variable $node_storage.
238 | ERROR | [x] Expected 1 blank line after function; 2 found
245 | WARNING | [ ] Unused variable $node_storage.
276 | WARNING | [ ] Line exceeds 80 characters; contains 81 characters
276 | ERROR | [x] No space found before comment text; expected "// Update SafeDelete settings
| | enforce_bulk_publish_verify_checkpagepublished" but found "//Update SafeDelete settings
| | enforce_bulk_publish_verify_checkpagepublished"
276 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
278 | ERROR | [x] There should be no white space before a closing ")"
279 | ERROR | [x] There should be no white space after an opening "("
292 | ERROR | [x] No space found before comment text; expected "// Update Settings" but found "//Update Settings"
292 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
294 | ERROR | [x] There should be no white space after an opening "("
308 | ERROR | [x] No space found before comment text; expected "// only add this option when publish latest version
| | actoin is available" but found "//only add this option when publish latest version actoin is
| | available"
308 | ERROR | [x] Inline comments must start with a capital letter
308 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
314 | ERROR | [x] Expected 1 space before "?"; 0 found
315 | WARNING | [x] A comma should follow the last multiline array item. Found: FALSE
317 | ERROR | [x] Expected 1 space after "="; 2 found
334 | ERROR | [x] No space found before comment text; expected "// only add this option when publish latest version
| | actoin is available" but found "//only add this option when publish latest version actoin is
| | available"
334 | ERROR | [x] Inline comments must start with a capital letter
334 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
337 | ERROR | [x] Expected 1 space after "="; 2 found
340 | ERROR | [x] Expected 1 space before "?"; 0 found
341 | WARNING | [x] A comma should follow the last multiline array item. Found: FALSE
343 | ERROR | [x] Expected 1 space after "="; 2 found
347 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 3
347 | ERROR | [x] Closing brace indented incorrectly; expected 4 spaces, found 3
362 | WARNING | [ ] Unused variable $langcode.
373 | WARNING | [ ] Unused variable $fid.
389 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
389 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 1
392 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
392 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 1
392 | ERROR | [x] Closing brace indented incorrectly; expected 8 spaces, found 1
393 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
393 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 1
395 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
395 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 1
398 | ERROR | [x] Use "elseif" in place of "else if"
418 | WARNING | [ ] Unused variable $langcode.
474 | WARNING | [x] '@TODO: Review possibility of moving validate to a field constraint instead.' should match the
| | format '@todo Fix problem X here.'
476 | WARNING | [ ] Unused variable $langcode.
492 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
514 | WARNING | [ ] Unused variable $field_type.
533 | ERROR | [x] Expected 1 blank line after function; 2 found
549 | ERROR | [x] Expected 1 space between double arrow and "Url"; 2 found
549 | ERROR | [x] Expected 1 space after "=>"; 2 found
558 | ERROR | [x] Expected 1 blank line after function; 2 found
564 | ERROR | [ ] Invalid function name, expected _handle_insert_file_usage_page_creation but found
| | _handleInsertFileUsage_PageCreation
564 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found
| | "_handleInsertFileUsage_PageCreation" but expected
| | "safedelete__handleInsertFileUsage_PageCreation"
569 | WARNING | [ ] Line exceeds 80 characters; contains 105 characters
569 | ERROR | [x] Inline comments must start with a capital letter
569 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
569 | ERROR | [x] Comments may not appear after statements
573 | ERROR | [x] Expected 1 space after "="; 2 found
576 | ERROR | [x] There should be no white space after an opening "("
576 | ERROR | [x] Space found before comma in argument list
581 | ERROR | [x] There should be no white space after an opening "("
581 | ERROR | [x] Space found before comma in argument list
582 | ERROR | [x] There should be no white space after an opening "("
584 | ERROR | [x] There should be no white space after an opening "("
591 | ERROR | [x] Space before opening parenthesis of function call prohibited
591 | ERROR | [x] There should be no white space after an opening "("
591 | ERROR | [x] Space found before comma in argument list
591 | ERROR | [x] There should be no white space before a closing ")"
595 | ERROR | [x] Expected 1 space after "="; 2 found
599 | ERROR | [x] There should be no white space after an opening "("
599 | ERROR | [x] There should be no white space before a closing ")"
609 | ERROR | [x] Expected 1 blank line after function; 2 found
621 | WARNING | [x] A comma should follow the last multiline array item. Found: NULL
623 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
627 | ERROR | [x] Missing function doc comment
627 | ERROR | [ ] Invalid function name, expected batch_process_nodes_op but found batch_ProcessNodes_Op
627 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found
| | "batch_ProcessNodes_Op" but expected "safedelete_batch_ProcessNodes_Op"
634 | ERROR | [x] Comments may not appear after statements
637 | ERROR | [ ] sizeof() is a function name alias, use count() instead
637 | ERROR | [x] Expected one space after the comma, 0 found
646 | ERROR | [x] Expected one space after the comma, 0 found
647 | ERROR | [x] Expected one space after the comma, 0 found
650 | ERROR | [x] Inline comments must start with a capital letter
650 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
651 | ERROR | [x] There should be no white space after an opening "("
656 | ERROR | [x] Use "elseif" in place of "else if"
657 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
658 | ERROR | [x] There should be no white space after an opening "("
665 | WARNING | [x] '@TODO: Performance and scalability improvement suggestion:' should match the format '@todo Fix
| | problem X here.'
665 | ERROR | [x] No space found before comment text; expected "// @TODO: Performance and scalability improvement
| | suggestion:" but found "//@TODO: Performance and scalability improvement suggestion:"
668 | WARNING | [ ] Line exceeds 80 characters; contains 105 characters
670 | WARNING | [ ] Unused variable $ntype.
670 | ERROR | [x] Expected 1 space after "="; 2 found
673 | ERROR | [x] Expected 1 space after "="; 2 found
673 | ERROR | [x] Comments may not appear after statements
674 | ERROR | [x] Expected 1 space after "="; 2 found
676 | ERROR | [x] Expected 1 space after "="; 2 found
677 | ERROR | [x] Expected 1 space after "="; 2 found
678 | ERROR | [x] Expected 1 space after "="; 2 found
680 | ERROR | [x] Inline comments must start with a capital letter
680 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
681 | ERROR | [x] Short array syntax must be used to define arrays
681 | ERROR | [x] There should be no white space after an opening "("
681 | ERROR | [x] The first index in a multi-value array must be on a new line
682 | ERROR | [x] Array indentation error, expected 8 spaces but found 32
683 | ERROR | [x] Array indentation error, expected 8 spaces but found 32
684 | ERROR | [x] Array indentation error, expected 8 spaces but found 32
684 | ERROR | [x] Expected 1 space after "=>"; 2 found
685 | ERROR | [x] Array indentation error, expected 8 spaces but found 32
686 | ERROR | [x] Array indentation error, expected 8 spaces but found 32
686 | ERROR | [x] Closing parenthesis of array declaration must be on a new line
687 | ERROR | [x] Expected 1 space before "|"; 0 found
687 | ERROR | [x] Expected 1 space after "|"; 0 found
687 | ERROR | [x] Expected 1 space before "|"; 0 found
687 | ERROR | [x] Expected 1 space after "|"; 0 found
689 | WARNING | [ ] Unused variable $file.
696 | ERROR | [x] Expected 1 blank line after function; 2 found
700 | ERROR | [x] Doc comment short description must end with a full stop
702 | ERROR | [ ] Invalid function name, expected batch_process_nodes_finished but found batch_ProcessNodes_finished
702 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name, found
| | "batch_ProcessNodes_finished" but expected "safedelete_batch_ProcessNodes_finished"
708 | WARNING | [ ] Line exceeds 80 characters; contains 94 characters
708 | ERROR | [x] No space found before comment text; expected "// $messenger->addMessage(t('@count nodes are
| | processed.', ['@count' => count($results)]));" but found "//$messenger->addMessage(t('@count nodes
| | are processed.', ['@count' => count($results)]));"
709 | WARNING | [ ] Line exceeds 80 characters; contains 94 characters
709 | ERROR | [x] No space found before comment text; expected "// $messenger->addMessage(t('The final result was
| | "%final"', ['%final' => end($results)]));" but found "//$messenger->addMessage(t('The final result
| | was "%final"', ['%final' => end($results)]));"
727 | ERROR | [x] Hook implementations must be documented with "Implements hook_example()."
734 | ERROR | [x] Expected one space after the comma, 0 found
740 | WARNING | [ ] Hook implementations should not duplicate @param documentation
740 | ERROR | [ ] Missing parameter name
750 | WARNING | [ ] Unused variable $error_message.
755 | ERROR | [x] No space found before comment text; expected "// echo print_r($hookObject, TRUE);" but found
| | "//echo print_r($hookObject, TRUE);"
755 | ERROR | [x] Inline comments must start with a capital letter
755 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
759 | ERROR | [x] Expected 1 blank line after function; 2 found
765 | WARNING | [ ] Hook implementations should not duplicate @param documentation
765 | ERROR | [ ] Missing parameter name
769 | WARNING | [ ] Unused variable $state.
781 | ERROR | [x] Expected one space after the comma, 0 found
781 | ERROR | [x] Expected 1 space between double arrow and "$nid"; 0 found
781 | ERROR | [x] Expected 1 space after "=>"; 0 found
794 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
800 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
804 | ERROR | [x] Expected 1 space after "="; 2 found
804 | ERROR | [x] Expected 1 space before "-"; 0 found
804 | ERROR | [x] Expected 1 space after "-"; 0 found
807 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
808 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
817 | ERROR | [x] There should be no white space before a closing ")"
820 | ERROR | [x] Use "elseif" in place of "else if"
821 | WARNING | [ ] Only string literals should be passed to t() where possible
822 | ERROR | [x] Expected 1 space before "-"; 0 found
822 | ERROR | [x] Expected 1 space after "-"; 0 found
826 | WARNING | [ ] Only string literals should be passed to t() where possible
826 | ERROR | [x] Space found before comma in argument list
826 | ERROR | [x] Expected one space after the comma, 0 found
827 | ERROR | [x] Expected 1 space before "-"; 0 found
827 | ERROR | [x] Expected 1 space after "-"; 0 found
833 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
834 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
837 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
837 | WARNING | [ ] Unused variable $delta.
848 | ERROR | [x] There should be no white space before a closing ")"
851 | ERROR | [x] Use "elseif" in place of "else if"
852 | WARNING | [ ] Only string literals should be passed to t() where possible
857 | WARNING | [ ] Only string literals should be passed to t() where possible
857 | ERROR | [x] Space found before comma in argument list
857 | ERROR | [x] Expected one space after the comma, 0 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 202 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\safedelete\src\AdminHelper.php
------------------------------------------------------------------------------------------------------------------------
FOUND 133 ERRORS AND 34 WARNINGS AFFECTING 139 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
3 | ERROR | [x] There must be one blank line after the namespace declaration
7 | WARNING | [x] Unused use statement
13 | WARNING | [x] Unused use statement
14 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
17 | ERROR | [x] Missing class doc comment
19 | ERROR | [x] The static declaration must come after the visibility declaration
19 | ERROR | [x] Missing function doc comment
21 | ERROR | [x] Expected 1 blank line after function; 2 found
24 | ERROR | [x] The static declaration must come after the visibility declaration
24 | ERROR | [x] Missing function doc comment
24 | ERROR | [ ] Variable "DEBUG" starts with a capital letter, but only $lowerCamelCase or $snake_case is allowed
25 | ERROR | [x] No space found before comment text; expected "// $DEBUG = TRUE;" but found "//$DEBUG = TRUE;"
26 | ERROR | [ ] Variable "DEBUG" starts with a capital letter, but only $lowerCamelCase or $snake_case is allowed
29 | ERROR | [x] Expected 1 blank line after function; 2 found
35 | ERROR | [x] The static declaration must come after the visibility declaration
36 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
39 | ERROR | [x] Short array syntax must be used to define arrays
48 | ERROR | [x] Expected 1 blank line after function; 2 found
54 | ERROR | [x] The static declaration must come after the visibility declaration
57 | ERROR | [x] Expected 1 blank line after function; 2 found
61 | WARNING | [ ] Line exceeds 80 characters; contains 82 characters
63 | ERROR | [x] The static declaration must come after the visibility declaration
64 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
65 | WARNING | [ ] Unused variable $language.
67 | ERROR | [x] Short array syntax must be used to define arrays
74 | ERROR | [x] Expected 1 blank line after function; 2 found
79 | ERROR | [x] Doc comment short description must be on the first line
81 | ERROR | [ ] Public method name "AdminHelper::_latest_revision" is not in lowerCamel format
108 | ERROR | [x] Expected 1 blank line after function; 2 found
111 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
114 | ERROR | [x] The static declaration must come after the visibility declaration
133 | ERROR | [x] Expected 1 blank line after function; 2 found
136 | ERROR | [ ] Parameter $current_uid is not described in comment
147 | ERROR | [x] The static declaration must come after the visibility declaration
159 | ERROR | [x] Expected 1 blank line after function; 2 found
165 | ERROR | [x] The static declaration must come after the visibility declaration
165 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
171 | WARNING | [ ] Unused variable $message.
175 | WARNING | [ ] Unused variable $langcode.
192 | ERROR | [x] Expected 1 space before "="; 0 found
193 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
193 | WARNING | [ ] Unused variable $key.
194 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
246 | WARNING | [ ] Only string literals should be passed to t() where possible
250 | WARNING | [ ] Unused variable $key.
263 | WARNING | [ ] Do not concatenate strings to translatable strings, they should be part of the t() argument and
| | you should use placeholders
288 | ERROR | [x] Expected 1 blank line after function; 2 found
294 | ERROR | [x] The static declaration must come after the visibility declaration
294 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
300 | WARNING | [ ] Unused variable $message.
304 | WARNING | [ ] Unused variable $langcode.
308 | WARNING | [ ] Unused variable $node_storage.
361 | WARNING | [ ] Only string literals should be passed to t() where possible
365 | WARNING | [ ] Unused variable $key.
398 | ERROR | [x] Expected 1 blank line after function; 2 found
404 | ERROR | [x] The static declaration must come after the visibility declaration
404 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "NULL" but found "null"
411 | WARNING | [ ] Unused variable $message.
415 | WARNING | [ ] Unused variable $langcode.
421 | WARNING | [ ] Unused variable $node_storage.
474 | WARNING | [ ] Only string literals should be passed to t() where possible
482 | WARNING | [ ] Unused variable $key.
520 | ERROR | [x] The static declaration must come after the visibility declaration
522 | WARNING | [ ] Unused variable $parentMenuLink.
542 | ERROR | [x] Expected 1 blank line after function; 2 found
546 | ERROR | [x] Doc comment short description must end with a full stop
548 | ERROR | [x] Visibility must be declared on method "findOtherLinkedReferences"
552 | WARNING | [x] '@TODO: later,also in case not using linkit also check for /node/{id} links in case NOT using
| | linkit correctly.' should match the format '@todo Fix problem X here.'
553 | WARNING | [ ] Unused variable $node_storage.
563 | ERROR | [x] Expected 1 blank line after function; 2 found
567 | ERROR | [x] Doc comment short description must end with a full stop
569 | ERROR | [x] Visibility must be declared on method "findLinkitReferences"
573 | WARNING | [ ] Unused variable $node_storage.
583 | ERROR | [x] Expected 1 blank line after function; 2 found
587 | WARNING | [ ] Line exceeds 80 characters; contains 128 characters
589 | ERROR | [x] The static declaration must come after the visibility declaration
595 | ERROR | [x] Expected 1 space after "="; 2 found
598 | ERROR | [x] There should be no white space before a closing ")"
599 | WARNING | [ ] Unused variable $querydelete.
603 | ERROR | [x] No space found before comment text; expected "// break from the loop due to deleting all records
| | associated to node id." but found "//break from the loop due to deleting all records associated to
| | node id."
603 | ERROR | [x] Inline comments must start with a capital letter
607 | WARNING | [ ] Empty return statement not required here
610 | ERROR | [x] The static declaration must come after the visibility declaration
610 | ERROR | [x] Missing function doc comment
610 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$filedirectory"; expected 1
| | but found 0
616 | ERROR | [x] Comments may not appear after statements
618 | ERROR | [x] Comments may not appear after statements
643 | ERROR | [x] Expected 1 space after "="; 2 found
645 | ERROR | [x] There should be no white space after an opening "("
646 | ERROR | [x] There should be no white space after an opening "("
646 | ERROR | [x] There should be no white space before a closing ")"
647 | ERROR | [x] Expected 1 space after "+"; 0 found
652 | ERROR | [x] Expected 1 space after IF keyword; 0 found
656 | ERROR | [x] Inline comments must start with a capital letter
656 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
658 | WARNING | [ ] Unused variable $filearraynid.
658 | ERROR | [x] Short array syntax must be used to define arrays
660 | ERROR | [x] Space found before object operator
664 | ERROR | [x] There should be no white space before a closing ")"
665 | ERROR | [x] Comments may not appear after statements
668 | ERROR | [ ] sizeof() is a function name alias, use count() instead
668 | ERROR | [x] Expected one space after the comma, 0 found
671 | WARNING | [ ] Unused variable $moderation_state.
677 | ERROR | [x] Expected one space after the comma, 0 found
678 | ERROR | [x] Expected one space after the comma, 0 found
681 | ERROR | [x] Inline comments must start with a capital letter
681 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
682 | ERROR | [x] There should be no white space after an opening "("
687 | ERROR | [x] Use "elseif" in place of "else if"
688 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
689 | ERROR | [x] There should be no white space after an opening "("
698 | WARNING | [x] '@TODO: Performance and scalability improvement suggestion:' should match the format '@todo Fix
| | problem X here.'
698 | ERROR | [x] No space found before comment text; expected "// @TODO: Performance and scalability improvement
| | suggestion:" but found "//@TODO: Performance and scalability improvement suggestion:"
701 | WARNING | [ ] Line exceeds 80 characters; contains 107 characters
703 | WARNING | [ ] Unused variable $ntype.
703 | ERROR | [x] Expected 1 space after "="; 2 found
706 | ERROR | [x] Expected 1 space after "="; 2 found
707 | ERROR | [x] Expected 1 space after "="; 2 found
709 | ERROR | [x] Expected 1 space after "="; 2 found
710 | ERROR | [x] Expected 1 space after "="; 2 found
711 | ERROR | [x] Expected 1 space after "="; 2 found
714 | ERROR | [x] Inline comments must start with a capital letter
714 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
715 | ERROR | [x] Short array syntax must be used to define arrays
715 | ERROR | [x] There should be no white space after an opening "("
715 | ERROR | [x] The first index in a multi-value array must be on a new line
716 | ERROR | [x] Array indentation error, expected 10 spaces but found 34
717 | ERROR | [x] Array indentation error, expected 10 spaces but found 34
718 | ERROR | [x] Array indentation error, expected 10 spaces but found 34
718 | ERROR | [x] Expected 1 space after "=>"; 2 found
719 | ERROR | [x] Array indentation error, expected 10 spaces but found 34
720 | ERROR | [x] Array indentation error, expected 10 spaces but found 34
720 | ERROR | [x] Closing parenthesis of array declaration must be on a new line
721 | ERROR | [x] Expected 1 space before "|"; 0 found
721 | ERROR | [x] Expected 1 space after "|"; 0 found
721 | ERROR | [x] Expected 1 space before "|"; 0 found
721 | ERROR | [x] Expected 1 space after "|"; 0 found
726 | WARNING | [ ] Empty return statement not required here
727 | ERROR | [x] Expected 1 blank line after function; 2 found
730 | ERROR | [x] Missing function doc comment
735 | ERROR | [x] Expected 1 blank line after function; 2 found
738 | ERROR | [x] Missing function doc comment
738 | ERROR | [x] Expected one space after the comma, 0 found
743 | ERROR | [x] Expected 1 blank line after function; 2 found
746 | ERROR | [x] Missing function doc comment
775 | ERROR | [x] Use "elseif" in place of "else if"
782 | ERROR | [x] Expected 1 blank line after function; 2 found
785 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 4
786 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found
787 | ERROR | [x] Expected 5 space(s) before asterisk; 3 found
797 | ERROR | [x] Concat operator must be surrounded by a single space
807 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$markup"; expected 1 but
| | found 0
824 | WARNING | [ ] Unused variable $moderation_state.
833 | ERROR | [x] Concat operator must be surrounded by a single space
834 | ERROR | [x] Expected 1 space after "="; 2 found
834 | ERROR | [x] Concat operator must be surrounded by a single space
837 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
844 | ERROR | [x] Expected 1 space after "="; 0 found
854 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$markup"; expected 1 but
| | found 0
884 | ERROR | [x] Concat operator must be surrounded by a single space
885 | ERROR | [x] Expected 1 space after "="; 2 found
885 | ERROR | [x] Concat operator must be surrounded by a single space
887 | ERROR | [x] Expected 1 space after "="; 2 found
888 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "TRUE" but found "true"
901 | ERROR | [x] Expected 1 blank line after function; 0 found
902 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 132 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: ...:\xampp\htdocs\backendassignment\web\modules\contrib\safedelete\src\Controller\SearchingOrphanedPageController.php
------------------------------------------------------------------------------------------------------------------------
FOUND 37 ERRORS AND 20 WARNINGS AFFECTING 45 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
3 | ERROR | [x] There must be one blank line after the namespace declaration
6 | WARNING | [x] Unused use statement
7 | WARNING | [x] Unused use statement
11 | WARNING | [x] Unused use statement
12 | WARNING | [x] Unused use statement
12 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
15 | ERROR | [x] Missing class doc comment
31 | ERROR | [x] Expected 1 blank line before function; 2 found
32 | ERROR | [x] No space found before comment text; expected "// parent::__construct($configuration, $plugin_id,
| | $plugin_definition);" but found "//parent::__construct($configuration, $plugin_id,
| | $plugin_definition);"
32 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
36 | ERROR | [x] Missing function doc comment
44 | ERROR | [ ] Description for the @return value is missing
48 | WARNING | [ ] Unused variable $rountingname.
48 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
49 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
50 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
51 | WARNING | [ ] Line exceeds 80 characters; contains 114 characters
53 | ERROR | [x] No space found before comment text; expected "// $session_manager =
| | \Drupal::service('session_manager');" but found "//$session_manager =
| | \Drupal::service('session_manager');"
54 | ERROR | [x] No space found before comment text; expected "//
| | $session_manager->delete(\Drupal::currentUser()->id());" but found
| | "//$session_manager->delete(\Drupal::currentUser()->id());"
57 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
62 | ERROR | [x] Equals sign not aligned with surrounding assignments; expected 1 space but found 2 spaces
62 | ERROR | [x] Expected one space after the comma, 0 found
62 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
67 | WARNING | [x] A comma should follow the last multiline array item. Found: $vars_array
69 | ERROR | [x] Expected 1 blank line after function; 2 found
73 | ERROR | [x] Doc comment short description must start with a capital letter
73 | ERROR | [x] Doc comment short description must end with a full stop
75 | ERROR | [x] Expected 0 spaces before opening parenthesis; 1 found
80 | ERROR | [x] There should be no white space after an opening "{"
80 | ERROR | [x] Inline comments must start with a capital letter
80 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
80 | ERROR | [x] Comments may not appear after statements
81 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
82 | ERROR | [x] Expected 1 space after IF keyword; 0 found
83 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
87 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
88 | WARNING | [ ] Unused variable $filearraynid.
88 | ERROR | [x] Short array syntax must be used to define arrays
90 | ERROR | [x] Space found before object operator
94 | ERROR | [x] Expected 1 space after IF keyword; 0 found
96 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
97 | WARNING | [ ] Unused variable $key.
99 | ERROR | [x] Expected 1 space after "="; 2 found
103 | ERROR | [x] Expected 1 space after "="; 2 found
105 | ERROR | [x] Expected 1 space after "="; 2 found
114 | ERROR | [x] Inline comments must start with a capital letter
114 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
117 | ERROR | [x] Short array syntax must be used to define arrays
117 | ERROR | [x] There must be no space between the "array" keyword and the opening parenthesis
118 | ERROR | [x] Expected 1 space after "=>"; 0 found
119 | WARNING | [x] A comma should follow the last multiline array item. Found: $orphanedpages_results
122 | ERROR | [x] Expected 1 blank line after function; 2 found
125 | ERROR | [x] Missing function doc comment
127 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
130 | ERROR | [x] Expected 1 blank line after function; 0 found
131 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 42 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\backendassignment\web\modules\contrib\safedelete\src\Form\SafedeleteSettingsForm.php
------------------------------------------------------------------------------------------------------------------------
FOUND 31 ERRORS AND 43 WARNINGS AFFECTING 66 LINES
------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
7 | ERROR | [x] When importing a class with "use", do not include a leading \
8 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
10 | WARNING | [x] Unused use statement
11 | WARNING | [x] Unused use statement
12 | WARNING | [x] Unused use statement
13 | WARNING | [x] Unused use statement
41 | WARNING | [ ] NodeType::loadMultiple calls should be avoided in classes, use dependency injection instead
56 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
58 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
60 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
64 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
66 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
72 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
74 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
75 | WARNING | [x] A comma should follow the last multiline array item. Found: FALSE
79 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
81 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
83 | WARNING | [x] A comma should follow the last multiline array item. Found: FALSE
88 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
90 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
92 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
97 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
99 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
101 | WARNING | [x] A comma should follow the last multiline array item. Found: $first_bundle
105 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
109 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
115 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
117 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
118 | WARNING | [x] A comma should follow the last multiline array item. Found: FALSE
122 | ERROR | [x] Space after closing parenthesis of function call prohibited
122 | ERROR | [x] Space found before semicolon; expected ");" but found ") ;"
154 | ERROR | [x] Expected 1 blank line after function; 2 found
166 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 1
167 | ERROR | [x] Expected 2 space(s) before asterisk; 3 found
167 | ERROR | [x] Doc comment short description must end with a full stop
168 | ERROR | [x] Expected 2 space(s) before asterisk; 3 found
170 | WARNING | [ ] Unused variable $reporteddate.
171 | WARNING | [ ] Unused variable $orphanedpages_results.
173 | WARNING | [ ] Unused variable $database.
173 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
174 | WARNING | [ ] NodeType::loadMultiple calls should be avoided in classes, use dependency injection instead
179 | ERROR | [x] Comments may not appear after statements
181 | ERROR | [x] Comments may not appear after statements
185 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
190 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
195 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
201 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
203 | ERROR | [x] Expected 1 space after "="; 2 found
204 | ERROR | [x] Inline comments must start with a capital letter
204 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
207 | ERROR | [x] There should be no white space before a closing ")"
208 | ERROR | [x] Expected 1 space after "="; 2 found
214 | ERROR | [x] There should be no white space after an opening "("
215 | ERROR | [x] There should be no white space after an opening "("
215 | ERROR | [x] There should be no white space before a closing ")"
216 | ERROR | [x] Expected 1 space after "+"; 0 found
220 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
221 | ERROR | [x] Expected 1 space after IF keyword; 0 found
222 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
225 | ERROR | [x] Inline comments must start with a capital letter
225 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
226 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
227 | WARNING | [ ] Unused variable $filearraynid.
227 | ERROR | [x] Short array syntax must be used to define arrays
229 | ERROR | [x] Space found before object operator
230 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
236 | ERROR | [x] No space found before comment text; expected "// $i = 0;" but found "//$i = 0;"
238 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 5
238 | ERROR | [x] Space before opening parenthesis of function call prohibited
251 | ERROR | [x] Closing brace indented incorrectly; expected 5 spaces, found 6
259 | ERROR | [x] Expected 1 blank line after function; 0 found
260 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 43 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------

Time: 11.27 secs; Memory: 12MB

Steps to reproduce

Run the phpcs command on the module.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇳India sidharth_soman Bangalore

Live updates comments and jobs are added and updated live.
  • Coding standards

    It involves compliance with, or the content of coding standards. Requires broad community agreement.

Sign in to follow issues

Comments & Activities

  • Issue created by @sidharth_soman
  • Assigned to sidharth_soman
  • 🇮🇳India sidharth_soman Bangalore

    Working on it.

  • Issue was unassigned.
  • 🇮🇳India sidharth_soman Bangalore
  • First commit to issue fork.
  • Assigned to nitin_lama
  • @nitin_lama opened merge request.
  • Issue was unassigned.
  • 🇮🇳India nitin_lama India

    Open MR1 for the fixes.

    Remaining issues are:

    FILE: /home/system/Documents/contribution/safedelete-3360570/src/AdminHelper.php
    ---------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 12 ERRORS AND 10 WARNINGS AFFECTING 22 LINES
    ---------------------------------------------------------------------------------------------------------------------------------------------
      15 | ERROR   | Doc comment is empty
      20 | ERROR   | Doc comment is empty
      27 | ERROR   | Doc comment is empty
      30 | ERROR   | Variable "DEBUG" starts with a capital letter, but only $lowerCamelCase or $snake_case is allowed
      32 | ERROR   | Variable "DEBUG" starts with a capital letter, but only $lowerCamelCase or $snake_case is allowed
      64 | WARNING | Line exceeds 80 characters; contains 82 characters
      82 | ERROR   | Public method name "AdminHelper::_latest_revision" is not in lowerCamel format
     135 | ERROR   | Parameter $current_uid is not described in comment
     244 | WARNING | Only string literals should be passed to t() where possible
     261 | WARNING | Do not concatenate strings to translatable strings, they should be part of the t() argument and you should use placeholders
     358 | WARNING | Only string literals should be passed to t() where possible
     470 | WARNING | Only string literals should be passed to t() where possible
     580 | WARNING | Line exceeds 80 characters; contains 128 characters
     596 | WARNING | Line exceeds 80 characters; contains 81 characters
     600 | WARNING | Empty return statement not required here
     603 | ERROR   | Doc comment is empty
     667 | ERROR   | sizeof() is a function name alias, use count() instead
     700 | WARNING | Line exceeds 80 characters; contains 107 characters
     727 | WARNING | Empty return statement not required here
     730 | ERROR   | Doc comment is empty
     740 | ERROR   | Doc comment is empty
     750 | ERROR   | Doc comment is empty
    ---------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/system/Documents/contribution/safedelete-3360570/src/Controller/SearchingOrphanedPageController.php
    ---------------------------------------------------------------------------------------------------------------
    FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
    ---------------------------------------------------------------------------------------------------------------
      11 | ERROR   | Doc comment is empty
      34 | ERROR   | Doc comment is empty
      45 | ERROR   | Description for the @return value is missing
      52 | WARNING | Line exceeds 80 characters; contains 114 characters
     125 | ERROR   | Doc comment is empty
    ---------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/system/Documents/contribution/safedelete-3360570/safedelete.module
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 11 ERRORS AND 16 WARNINGS AFFECTING 22 LINES
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      29 | 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.", "* Implements
         |         | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates."
      30 | ERROR   | Doc comment short description must be on a single line, further text should be a separate paragraph
      69 | WARNING | Line exceeds 80 characters; contains 88 characters
     130 | WARNING | Line exceeds 80 characters; contains 140 characters
     159 | WARNING | Line exceeds 80 characters; contains 81 characters
     267 | WARNING | Line exceeds 80 characters; contains 83 characters
     553 | ERROR   | Invalid function name, expected _handle_insert_file_usage_page_creation but found _handleInsertFileUsage_PageCreation
     553 | ERROR   | All functions defined in a module file must be prefixed with the module's name, found "_handleInsertFileUsage_PageCreation" but expected "safedelete__handleInsertFileUsage_PageCreation"
     558 | WARNING | Line exceeds 80 characters; contains 88 characters
     616 | ERROR   | Doc comment is empty
     619 | ERROR   | Invalid function name, expected batch_process_nodes_op but found batch_ProcessNodes_Op
     619 | ERROR   | All functions defined in a module file must be prefixed with the module's name, found "batch_ProcessNodes_Op" but expected "safedelete_batch_ProcessNodes_Op"
     630 | ERROR   | sizeof() is a function name alias, use count() instead
     661 | WARNING | Line exceeds 80 characters; contains 105 characters
     697 | ERROR   | Invalid function name, expected batch_process_nodes_finished but found batch_ProcessNodes_finished
     697 | ERROR   | All functions defined in a module file must be prefixed with the module's name, found "batch_ProcessNodes_finished" but expected "safedelete_batch_ProcessNodes_finished"
     703 | WARNING | Line exceeds 80 characters; contains 95 characters
     704 | WARNING | Line exceeds 80 characters; contains 95 characters
     735 | WARNING | Hook implementations should not duplicate @param documentation
     735 | ERROR   | Missing parameter name
     759 | WARNING | Hook implementations should not duplicate @param documentation
     759 | ERROR   | Missing parameter name
     788 | WARNING | Line exceeds 80 characters; contains 82 characters
     815 | WARNING | Only string literals should be passed to t() where possible
     820 | WARNING | Only string literals should be passed to t() where possible
     846 | WARNING | Only string literals should be passed to t() where possible
     851 | WARNING | Only string literals should be passed to t() where possible
    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    
    Time: 185ms; Memory: 14MB
    
    FILE: /home/system/Documents/contribution/safedelete-3360570/src/AdminHelper.php
    --------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 21 WARNINGS AFFECTING 21 LINES
    --------------------------------------------------------------------------------
      68 | WARNING | Unused variable $language.
     169 | WARNING | Unused variable $message.
     173 | WARNING | Unused variable $langcode.
     191 | WARNING | Unused variable $key.
     248 | WARNING | Unused variable $key.
     297 | WARNING | Unused variable $message.
     301 | WARNING | Unused variable $langcode.
     305 | WARNING | Unused variable $node_storage.
     362 | WARNING | Unused variable $key.
     407 | WARNING | Unused variable $message.
     411 | WARNING | Unused variable $langcode.
     417 | WARNING | Unused variable $node_storage.
     478 | WARNING | Unused variable $key.
     518 | WARNING | Unused variable $parentMenuLink.
     548 | WARNING | Unused variable $node_storage.
     567 | WARNING | Unused variable $node_storage.
     592 | WARNING | Unused variable $querydelete.
     656 | WARNING | Unused variable $filearraynid.
     670 | WARNING | Unused variable $moderation_state.
     702 | WARNING | Unused variable $ntype.
     830 | WARNING | Unused variable $moderation_state.
    --------------------------------------------------------------------------------
    
    
    FILE: /home/system/Documents/contribution/safedelete-3360570/src/Controller/SearchingOrphanedPageController.php
    ---------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 13 WARNINGS AFFECTING 12 LINES
    ---------------------------------------------------------------------------------------------------------------
      49 | WARNING | Unused variable $rountingname.
      49 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
      50 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
      51 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
      58 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
      63 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
      82 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
      84 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
      88 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
      89 | WARNING | Unused variable $filearraynid.
      97 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
      98 | WARNING | Unused variable $key.
     130 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    ---------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/system/Documents/contribution/safedelete-3360570/src/Form/SafedeleteSettingsForm.php
    ------------------------------------------------------------------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 31 WARNINGS AFFECTING 30 LINES
    ------------------------------------------------------------------------------------------------------------------------------------------
      35 | WARNING | NodeType::loadMultiple calls should be avoided in classes, use dependency injection instead
      50 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      52 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      58 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      60 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      66 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      68 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      73 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      75 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      82 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      84 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      91 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      93 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
      99 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     103 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     109 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     111 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
     163 | WARNING | Unused variable $reporteddate.
     164 | WARNING | Unused variable $orphanedpages_results.
     166 | WARNING | Unused variable $database.
     166 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     167 | WARNING | NodeType::loadMultiple calls should be avoided in classes, use dependency injection instead
     180 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     185 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     190 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     196 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     215 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     217 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     221 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
     222 | WARNING | Unused variable $filearraynid.
     225 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
    ------------------------------------------------------------------------------------------------------------------------------------------
    
    
    FILE: /home/system/Documents/contribution/safedelete-3360570/safedelete.module
    ------------------------------------------------------------------------------
    FOUND 0 ERRORS AND 14 WARNINGS AFFECTING 14 LINES
    ------------------------------------------------------------------------------
     132 | WARNING | Unused variable $difcount.
     142 | WARNING | There must be no blank line following an inline comment
     210 | WARNING | Unused variable $node_storage.
     236 | WARNING | Unused variable $node_storage.
     353 | WARNING | Unused variable $langcode.
     364 | WARNING | Unused variable $fid.
     409 | WARNING | Unused variable $langcode.
     467 | WARNING | Unused variable $langcode.
     505 | WARNING | Unused variable $field_type.
     663 | WARNING | Unused variable $ntype.
     685 | WARNING | Unused variable $file.
     745 | WARNING | Unused variable $error_message.
     763 | WARNING | Unused variable $state.
     831 | WARNING | Unused variable $delta.
    ------------------------------------------------------------------------------
    
    Time: 174ms; Memory: 12MB
    
  • 🇨🇦Canada joseph.olstad

    The MR has conflicts due to recent changes made in

  • First commit to issue fork.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India bharath-kondeti Hyderabad

    Rebased the changes as per #8.

  • Status changed to Fixed over 1 year ago
  • 🇨🇦Canada joseph.olstad

    Thanks again

    Tagged release with the above changes:
    https://www.drupal.org/project/safedelete/releases/1.0.43 →

  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Status changed to Needs work about 1 year ago
  • 🇨🇦Canada joseph.olstad

    found a regression

  • 🇨🇦Canada joseph.olstad

    fixed regression

    commit 8b141b1ae0c17ed22d01bc35611b397cdfe07790 (HEAD -> 1.0.x, origin/HEAD, origin/1.0.x)
    Author: Joseph Olstad <20895-joseph.olstad@users.noreply.drupalcode.org>
    Date:   Mon Sep 11 12:10:12 2023 -0400
    
        Issue #3360570 by joseph.olstad: Fix the issues reported by phpcs
  • Status changed to Fixed about 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024