Comments

ankush_03’s picture

Issue summary: View changes

Hi ,

Please fix Coding Standarad issue.

GOTO https://pareview.sh : Enter 8.x-1.x branch url i.e. https://git.drupal.org/project/autocomplete_deluxe 8.x-1.x DrupalPractice has found some issues with your code, but could be false positives.

FILE: ...eview_temp/src/Plugin/Field/FieldWidget/AutocompleteDeluxeWidget.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
--------------------------------------------------------------------------
216 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
229 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
--------------------------------------------------------------------------

FILE: ...ndor/drupal/pareviewsh/pareview_temp/autocomplete_deluxe.routing.yml
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------
6 | WARNING | Open page callback found, please add a comment before the
| | line why there is no access restriction
--------------------------------------------------------------------------

Time: 662ms; Memory: 6Mb

No automated test cases were found, did you consider writing PHPUnit tests? This is not a requirement but encouraged for professional software development.

This automated report was generated with PAReview.sh, your friendly project application review script.

FILE: ...eview_temp/src/Plugin/Field/FieldWidget/AutocompleteDeluxeWidget.php
--------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
--------------------------------------------------------------------------
15 | WARNING | [x] Unused use statement
204 | WARNING | [ ] Only string literals should be passed to t() where
| | possible
206 | WARNING | [ ] Only string literals should be passed to t() where
| | possible
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

FILE: ...viewsh/pareview_temp/src/Controller/AutocompleteDeluxeController.php
--------------------------------------------------------------------------
FOUND 24 ERRORS AFFECTING 24 LINES
--------------------------------------------------------------------------
28 | ERROR | [x] Expected newline after closing brace
29 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 12
33 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
34 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
35 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
36 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
37 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
38 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
39 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
40 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
41 | ERROR | [x] Line indented incorrectly; expected 8 spaces, found 10
42 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
43 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
44 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
45 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
46 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
47 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
48 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
50 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
52 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
53 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
54 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 8
55 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
57 | ERROR | [x] Line indented incorrectly; expected 4 spaces, found 6
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 24 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------

Time: 1.62 secs; Memory: 6Mb

/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 7, col 2, Error - Use the function form of 'use strict'. (strict)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 7, col 10, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 11, col 21, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 14, col 80, Error - There should be no spaces inside this paren. (space-in-parens)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 14, col 90, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 17, col 9, Error - Closing curly brace appears on the same line as the subsequent block. (brace-style)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 24, col 3, Warning - Missing JSDoc for parameter 'o'. (valid-jsdoc)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 24, col 3, Warning - Missing JSDoc @return for function. (valid-jsdoc)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 30, col 32, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 38, col 44, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 38, col 46, Error - Missing space before opening brace. (space-before-blocks)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 40, col 7, Error - Split 'var' declarations into multiple statements. (one-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 54, col 25, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 59, col 65, Error - A space is required after ','. (comma-spacing)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 63, col 11, Error - Split 'var' declarations into multiple statements. (one-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 89, col 39, Error - Multiple spaces found before '{'. (no-multi-spaces)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 89, col 86, Error - Strings must use singlequote. (quotes)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 89, col 89, Error - There should be no space before '}'. (object-curly-spacing)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 91, col 3, Warning - Missing JSDoc @return for function. (valid-jsdoc)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 91, col 3, Warning - Missing JSDoc for parameter 'value'. (valid-jsdoc)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 94, col 52, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 95, col 55, Error - Strings must use singlequote. (quotes)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 98, col 3, Warning - Missing JSDoc @return for function. (valid-jsdoc)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 98, col 3, Warning - Missing JSDoc for parameter 'term'. (valid-jsdoc)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 98, col 3, Warning - Missing JSDoc for parameter 'array'. (valid-jsdoc)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 101, col 47, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 102, col 76, Error - Strings must use singlequote. (quotes)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 103, col 34, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 108, col 47, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 116, col 3, Warning - Missing JSDoc parameter type for 'term'. (valid-jsdoc)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 123, col 68, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 127, col 62, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 128, col 5, Error - Expected space(s) after "if". (keyword-spacing)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 128, col 37, Error - Strings must use singlequote. (quotes)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 128, col 48, Error - Expected '!==' and instead saw '!='. (eqeqeq)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 149, col 5, Error - Closing curly brace appears on the same line as the subsequent block. (brace-style)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 150, col 25, Error - Multiple spaces found before 'settings'. (no-multi-spaces)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 163, col 34, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 164, col 20, Error - The array literal notation [] is preferrable. (no-array-constructor)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 194, col 19, Error - Missing semicolon. (semi)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 197, col 27, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 208, col 16, Error - Strings must use singlequote. (quotes)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 212, col 49, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 221, col 7, Error - Properties shouldn't be quoted as all quotes are redundant. (quote-props)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 221, col 7, Error - Extra space after key 'source'. (key-spacing)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 222, col 7, Error - Properties shouldn't be quoted as all quotes are redundant. (quote-props)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 227, col 31, Error - Unary word operator 'typeof' must be followed by whitespace. (space-unary-ops)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 231, col 24, Error - Strings must use singlequote. (quotes)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 231, col 54, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 236, col 24, Error - Strings must use singlequote. (quotes)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 236, col 56, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 245, col 13, Error - Properties shouldn't be quoted as all quotes are redundant. (quote-props)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 246, col 13, Error - Properties shouldn't be quoted as all quotes are redundant. (quote-props)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 255, col 55, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 255, col 55, Error - There should be no spaces inside this paren. (space-in-parens)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 256, col 11, Error - 't' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 257, col 21, Error - Expected '!==' and instead saw '!='. (eqeqeq)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 257, col 24, Error - Strings must use singlequote. (quotes)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 258, col 66, Error - There should be no spaces inside this paren. (space-in-parens)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 258, col 78, Error - There should be no spaces inside this paren. (space-in-parens)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 260, col 13, Error - 't' is already defined. (no-redeclare)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 260, col 38, Error - A space is required after ','. (comma-spacing)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 263, col 15, Error - There should be no spaces inside this paren. (space-in-parens)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 263, col 17, Error - Strings must use singlequote. (quotes)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 263, col 29, Error - There should be no spaces inside this paren. (space-in-parens)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 265, col 16, Error - There should be no spaces inside this paren. (space-in-parens)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 265, col 18, Error - Strings must use singlequote. (quotes)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 265, col 26, Error - 't' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 265, col 30, Error - Strings must use singlequote. (quotes)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 265, col 37, Error - There should be no spaces inside this paren. (space-in-parens)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 266, col 18, Error - There should be no spaces inside this paren. (space-in-parens)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 266, col 23, Error - There should be no spaces inside this paren. (space-in-parens)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 270, col 72, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 271, col 18, Error - The array literal notation [] is preferrable. (no-array-constructor)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 272, col 5, Error - The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype. (guard-for-in)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 278, col 3, Warning - Missing JSDoc for parameter 'settings'. (valid-jsdoc)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 281, col 53, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 289, col 69, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 293, col 30, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 296, col 7, Error - Closing curly brace appears on the same line as the subsequent block. (brace-style)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 302, col 3, Warning - Missing JSDoc for parameter 'input'. (valid-jsdoc)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 302, col 3, Warning - Missing JSDoc for parameter 'settings'. (valid-jsdoc)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 305, col 55, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 311, col 63, Error - The object literal notation {} is preferrable. (no-new-object)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 314, col 76, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 337, col 46, Error - Strings must use singlequote. (quotes)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 338, col 9, Error - 'input' is assigned a value but never used. (no-unused-vars)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 340, col 29, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 347, col 77, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 350, col 62, Error - There should be no spaces inside this paren. (space-in-parens)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 350, col 80, Error - There should be no spaces inside this paren. (space-in-parens)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 356, col 71, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 366, col 32, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 368, col 58, Error - There should be no spaces inside this paren. (space-in-parens)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 368, col 68, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 379, col 27, Error - Unexpected trailing comma. (comma-dangle)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 384, col 31, Error - Unary word operator 'typeof' must be followed by whitespace. (space-unary-ops)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 386, col 62, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 386, col 66, Error - Multiple spaces found before '{'. (no-multi-spaces)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 395, col 68, Error - Infix operators must be spaced. (space-infix-ops)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 398, col 5, Error - The body of a for-in should be wrapped in an if statement to filter unwanted properties from the prototype. (guard-for-in)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 400, col 17, Error - Expected '!==' and instead saw '!='. (eqeqeq)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 403, col 96, Error - Infix operators must be spaced. (space-infix-ops)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 405, col 11, Error - Extra space after key 'label'. (key-spacing)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 406, col 11, Error - Extra space after key 'value'. (key-spacing)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 408, col 13, Error - 'item' is already defined. (no-redeclare)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 419, col 29, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 429, col 28, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 434, col 19, Error - Strings must use singlequote. (quotes)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 434, col 49, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 448, col 19, Error - Strings must use singlequote. (quotes)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 448, col 49, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 452, col 27, Error - Missing space before function parentheses. (space-before-function-paren)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 460, col 11, Error - 'value' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 463, col 24, Error - Expected '===' and instead saw '=='. (eqeqeq)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 463, col 46, Error - 'value' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 463, col 73, Error - Expected '!==' and instead saw '!='. (eqeqeq)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 463, col 97, Error - Expected '===' and instead saw '=='. (eqeqeq)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 463, col 121, Error - Expected '!==' and instead saw '!='. (eqeqeq)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 463, col 124, Error - Strings must use singlequote. (quotes)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 472, col 9, Error - 'value' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 472, col 17, Error - 'value' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 472, col 33, Error - 'value' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 473, col 31, Error - 'value' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 473, col 56, Error - 'value' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 473, col 62, Error - Expected '!==' and instead saw '!='. (eqeqeq)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 475, col 20, Error - 'value' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 476, col 20, Error - 'value' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 481, col 25, Error - Expected '===' and instead saw '=='. (eqeqeq)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 487, col 23, Error - Expected '===' and instead saw '=='. (eqeqeq)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 487, col 31, Error - 'value' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 487, col 37, Error - Expected '===' and instead saw '=='. (eqeqeq)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 488, col 13, Error - 'last_element' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 490, col 13, Error - 'last_element' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 491, col 15, Error - 'value' is already defined. (no-redeclare)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 491, col 23, Error - 'last_element' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 494, col 9, Error - Closing curly brace appears on the same line as the subsequent block. (brace-style)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 495, col 11, Error - 'last_element' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 497, col 7, Error - Closing curly brace appears on the same line as the subsequent block. (brace-style)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 499, col 13, Error - 'last_element' used outside of binding context. (block-scoped-var)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 499, col 13, Error - 'last_element' is already defined. (no-redeclare)
/var/vhosts/c214000000/site1101/web/vendor/drupal/pareviewsh/pareview_temp/assets/js/autocomplete_deluxe.js: line 500, col 9, Error - 'last_element' used outside of binding context. (block-scoped-var)

142 problems

ankush_03’s picture

Category: Task » Bug report
ash2303’s picture

StatusFileSize
new7.96 KB

Fixed non-js Coding Standard issues in attached patch. There is one exception, as the CSS syntax is correct for below error:

`94 | ERROR | Style definitions must end with a semicolon`

ash2303’s picture

Status: Needs work » Needs review
edwardchiapet’s picture

Thanks, @ash2303, for the patch! It looks like your change in autocomplete_deluxe.routing.yml is causing a 403 forbidden response to the endpoint, as _access should be one of either TRUE or FALSE:

diff --git a/autocomplete_deluxe.routing.yml b/autocomplete_deluxe.routing.yml
index b4d1747..36c56aa 100644
--- a/autocomplete_deluxe.routing.yml
+++ b/autocomplete_deluxe.routing.yml
@@ -3,4 +3,4 @@ autocomplete_deluxe.autocomplete:
   defaults:
     _controller: '\Drupal\autocomplete_deluxe\Controller\AutocompleteDeluxeController::handleAutocomplete'
   requirements:
-    _access: 'TRUE'
+    _permission: 'access content'

I made an update to change _access to _permission, which will allow the access content permission to be used for access checking.

ankush_03’s picture

Issue tags: +Srijancontribution2020
rajab natshah’s picture

Version: 8.x-1.x-dev » 2.0.x-dev
Assigned: Unassigned » rajab natshah
rajab natshah’s picture


Drupal coding standard and Drupal Practice check should pass

PHPCS, PHPCBF for both --standard=Drupal and --standard=DrupalPractice

Check Autocomplete Deluxe Buttons Drupal coding standard

phpcbf --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml  /var/www/html/modules/autocomplete_deluxe/

phpcs --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/modules/autocomplete_deluxe/

Check CKEditor BiDi Buttons Drupal Practice

phpcbf --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml  /var/www/html/modules/autocomplete_deluxe/

phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/modules/autocomplete_deluxe/


rajab natshah’s picture

rajab@vardot-dev:/var/www/html/products/autocomplete_deluxe$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/modules/autocomplete_deluxe/

FILE: /var/www/html/modules/autocomplete_deluxe/src/Plugin/Field/FieldWidget/AutocompleteDeluxeWidget.php
---------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------
 203 | WARNING | Only string literals should be passed to t() where possible
 205 | WARNING | Only string literals should be passed to t() where possible
---------------------------------------------------------------------------------------------------------


FILE: /var/www/html/modules/autocomplete_deluxe/assets/css/autocomplete_deluxe.css
----------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------
 94 | ERROR | Style definitions must end with a semicolon
----------------------------------------------------------------------------------

Time: 161ms; Memory: 10MB

rajab@vardot-dev:/var/www/html/products/autocomplete_deluxe$ phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/modules/autocomplete_deluxe/

FILE: /var/www/html/modules/autocomplete_deluxe/src/Plugin/Field/FieldWidget/AutocompleteDeluxeWidget.php
---------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------
 215 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 228 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------


FILE: /var/www/html/modules/autocomplete_deluxe/autocomplete_deluxe.routing.yml
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
 6 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
-----------------------------------------------------------------------------------------------------------------

Time: 100ms; Memory: 8MB
rajab natshah’s picture

StatusFileSize
new8.92 KB
rajab@vardot-dev:/var/www/html/products/autocomplete_deluxe$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/autocomplete_deluxe/

rajab@vardot-dev:/var/www/html/products/autocomplete_deluxe$ phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,theme,scss,css,info,txt,md,yml /var/www/html/products/autocomplete_deluxe/
rajab natshah’s picture

Title: Coding Standarad issue » Fix Drupal coding standard and Drupal Practice

rajab natshah’s picture

rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Status: Fixed » Closed (fixed)

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