Skip to content

Instantly share code, notes, and snippets.

@HongPong
Created May 24, 2016 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HongPong/aaed726455d05fc20ed655f22944654f to your computer and use it in GitHub Desktop.
Save HongPong/aaed726455d05fc20ed655f22944654f to your computer and use it in GitHub Desktop.
code style notifications for vinculum-v8
based on the code AFTER this patch is applied
https://github.com/aleixq/vinculum-d8/pull/1
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,js,css,info,txt,md .
FILE: ...n/Sites/devdesktop/drupal811/modules/vinculum-d8/linkback.module
----------------------------------------------------------------------
FOUND 2 ERRORS AND 4 WARNINGS AFFECTING 5 LINES
----------------------------------------------------------------------
9 | WARNING | [x] Unused use statement
10 | WARNING | [x] Unused use statement
11 | WARNING | [x] Unused use statement
32 | WARNING | [ ] Format should be "* Implements hook_foo().", "*
| | Implements hook_foo_BAR_ID_bar() for
| | xyz_bar().",, "* Implements hook_foo_BAR_ID_bar()
| | for xyz-bar.html.twig.", or "* Implements
| | hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.".
33 | ERROR | [x] There must be exactly one blank line before the
| | tags in a doc comment
33 | ERROR | [ ] Missing parameter comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...ers/dan/Sites/devdesktop/drupal811/modules/vinculum-d8/README.md
----------------------------------------------------------------------
FOUND 1 ERROR AND 9 WARNINGS AFFECTING 9 LINES
----------------------------------------------------------------------
3 | WARNING | [ ] Line exceeds 80 characters; contains 116
| | characters
4 | WARNING | [ ] Line exceeds 80 characters; contains 159
| | characters
6 | WARNING | [ ] Line exceeds 80 characters; contains 223
| | characters
10 | WARNING | [ ] Line exceeds 80 characters; contains 180
| | characters
11 | WARNING | [ ] Line exceeds 80 characters; contains 150
| | characters
13 | WARNING | [ ] Line exceeds 80 characters; contains 115
| | characters
19 | WARNING | [ ] Line exceeds 80 characters; contains 91
| | characters
20 | WARNING | [ ] Line exceeds 80 characters; contains 92
| | characters
21 | WARNING | [ ] Line exceeds 80 characters; contains 184
| | characters
21 | ERROR | [x] Expected 1 newline at end of file; 3 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...op/drupal811/modules/vinculum-d8/src/Entity/LinkbackReceived.php
----------------------------------------------------------------------
FOUND 12 ERRORS AND 10 WARNINGS AFFECTING 22 LINES
----------------------------------------------------------------------
2 | ERROR | [x] Namespaced classes, interfaces and traits should
| | not begin with a file doc comment
15 | WARNING | [x] Unused use statement
18 | WARNING | [x] Unused use statement
21 | WARNING | [x] Unused use statement
22 | WARNING | [x] Unused use statement
60 | WARNING | [ ] Line exceeds 80 characters; contains 82
| | characters
64 | ERROR | [ ] Class property $last_error should use lowerCamel
| | naming without underscores
182 | WARNING | [ ] Code after RETURN statement cannot be executed
204 | ERROR | [ ] Doc comment for parameter $all_ does not match
| | actual variable name $all_langs
205 | ERROR | [ ] Parameter comment must start with a capital
| | letter
208 | ERROR | [ ] Expected "string|array" but found "String|Array"
| | for function return type
209 | ERROR | [ ] Return comment indentation must be 3 spaces,
| | found 1 spaces
214 | WARNING | [ ] Line exceeds 80 characters; contains 106
| | characters
218 | WARNING | [ ] Line exceeds 80 characters; contains 106
| | characters
311 | ERROR | [ ] Return type missing for @return tag in function
| | comment
312 | WARNING | [ ] Line exceeds 80 characters; contains 127
| | characters
316 | WARNING | [ ] Line exceeds 80 characters; contains 85
| | characters
346 | ERROR | [ ] Return type missing for @return tag in function
| | comment
378 | ERROR | [ ] @return doc comment specified, but function has
| | no return statement
379 | ERROR | [ ] Return comment indentation must be 3 spaces,
| | found 1 spaces
380 | ERROR | [ ] Return comment indentation must be 3 spaces,
| | found 1 spaces
381 | ERROR | [ ] Return comment indentation must be 3 spaces,
| | found 1 spaces
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...op/drupal811/modules/vinculum-d8/src/Event/LinkbackSendEvent.php
----------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------
33 | ERROR | Description for the @return value is missing
42 | ERROR | Missing parameter comment
42 | ERROR | Missing parameter type
51 | ERROR | Description for the @return value is missing
60 | ERROR | Missing parameter comment
60 | ERROR | Missing parameter type
69 | ERROR | Doc comment for parameter $account does not match
| | actual variable name $target_url
----------------------------------------------------------------------
FILE: ...upal811/modules/vinculum-d8/src/Event/LinkbackSendRulesEvent.php
----------------------------------------------------------------------
FOUND 8 ERRORS AND 1 WARNING AFFECTING 7 LINES
----------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
35 | ERROR | [ ] Description for the @return value is missing
44 | ERROR | [ ] Missing parameter comment
44 | ERROR | [ ] Missing parameter type
53 | ERROR | [ ] Description for the @return value is missing
62 | ERROR | [ ] Missing parameter comment
62 | ERROR | [ ] Missing parameter type
71 | ERROR | [ ] Missing parameter name
73 | ERROR | [ ] Missing parameter name
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...rupal811/modules/vinculum-d8/src/Exception/LinkbackException.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should
| | not begin with a file doc comment
13 | ERROR | [x] Expected 1 newline at end of file; 2 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...upal811/modules/vinculum-d8/src/Form/LinkbackSenderQueueForm.php
----------------------------------------------------------------------
FOUND 5 ERRORS AND 2 WARNINGS AFFECTING 7 LINES
----------------------------------------------------------------------
11 | WARNING | [x] Unused use statement
12 | WARNING | [x] Unused use statement
23 | ERROR | [ ] Missing short description in doc comment
28 | ERROR | [ ] Missing short description in doc comment
63 | ERROR | [ ] Description for the @return value must be on the
| | next line
71 | ERROR | [ ] Doc comment short description must start with a
| | capital letter
78 | ERROR | [ ] Doc comment short description must start with a
| | capital letter
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: .../drupal811/modules/vinculum-d8/src/Form/LinkbackSettingsForm.php
----------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
7 | WARNING | [x] Unused use statement
8 | WARNING | [x] Unused use statement
8 | ERROR | [x] There must be one blank line after the last USE
| | statement; 0 found;
53 | WARNING | [ ] Line exceeds 80 characters; contains 93
| | characters
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...modules/vinculum-d8/src/LinkbackReceivedAccessControlHandler.php
----------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
2 | ERROR | [x] Namespaced classes, interfaces and traits should
| | not begin with a file doc comment
29 | WARNING | [ ] Code after RETURN statement cannot be executed
33 | WARNING | [ ] Code after RETURN statement cannot be executed
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: .../drupal811/modules/vinculum-d8/src/LinkbackReceivedInterface.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
2 | ERROR | [x] Namespaced classes, interfaces and traits should not
| | begin with a file doc comment
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...vdesktop/drupal811/modules/vinculum-d8/src/LinkbackViewsData.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
6 | ERROR | Doc comment is empty
11 | ERROR | Doc comment is empty
----------------------------------------------------------------------
FILE: ...inculum-d8/src/Plugin/Field/FieldFormatter/LinkbackFormatter.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...s/vinculum-d8/src/Plugin/Field/FieldType/LinkbackHandlerItem.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
6 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...nculum-d8/src/Plugin/Field/FieldWidget/LinkbackDefaultWidget.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
6 | WARNING | [x] Unused use statement
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...11/modules/vinculum-d8/src/Plugin/QueueWorker/LinkbackSender.php
----------------------------------------------------------------------
FOUND 7 ERRORS AND 4 WARNINGS AFFECTING 11 LINES
----------------------------------------------------------------------
2 | ERROR | [x] Namespaced classes, interfaces and traits should
| | not begin with a file doc comment
4 | ERROR | [x] Doc comment short description must end with a
| | full stop
10 | WARNING | [x] Unused use statement
11 | WARNING | [x] Unused use statement
56 | ERROR | [ ] Missing parameter name
59 | ERROR | [ ] Expected type hint
| | "Drupal/Core/Entity/EntityFieldManagerInterface";
| | found "EntityFieldManagerInterface" for
| | $field_manager
103 | WARNING | [ ] Line exceeds 80 characters; contains 81
| | characters
104 | ERROR | [ ] Inline doc block comments are not allowed; use
| | "/* Comment */" or "// Comment" instead
123 | ERROR | [ ] Parameter comment must end with a full stop
125 | ERROR | [ ] Return type missing for @return tag in function
| | comment
126 | WARNING | [ ] Line exceeds 80 characters; contains 127
| | characters
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...ules/vinculum-d8/src/Plugin/QueueWorker/ManualLinkbackSender.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
5 | WARNING | Line exceeds 80 characters; contains 104 characters
----------------------------------------------------------------------
FILE: .../Plugin/Validation/Constraint/UnregisteredLinkbackConstraint.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
26 | WARNING | Line exceeds 80 characters; contains 84 characters
----------------------------------------------------------------------
FILE: ...upal811/modules/vinculum-d8/src/Plugin/views/wizard/Linkback.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
5 | WARNING | [x] Unused use statement
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...drupal811/modules/vinculum-d8/src/Tests/LinkbackReceivedTest.php
----------------------------------------------------------------------
FOUND 6 ERRORS AND 11 WARNINGS AFFECTING 17 LINES
----------------------------------------------------------------------
2 | ERROR | [x] Namespaced classes, interfaces and traits should
| | not begin with a file doc comment
15 | WARNING | [x] Unused use statement
16 | WARNING | [x] Unused use statement
17 | WARNING | [x] Unused use statement
23 | WARNING | [ ] Possible parse error: class missing opening or
| | closing brace
29 | ERROR | [ ] If the line declaring an array spans longer than
| | 80 characters, each element should be broken
| | into its own line
32 | ERROR | [ ] Doc comment short description must start with a
| | capital letter
34 | ERROR | [ ] Invalid function name, expected set_up but found
| | setUp
42 | ERROR | [ ] Invalid function name, expected
| | test_save_linkback_received but found
| | testSaveLinkbackReceived
53 | WARNING | [ ] Line exceeds 80 characters; contains 102
| | characters
55 | WARNING | [ ] Line exceeds 80 characters; contains 107
| | characters
73 | WARNING | [ ] Line exceeds 80 characters; contains 92
| | characters
80 | ERROR | [ ] Invalid function name, expected
| | test_linkback_received_uuid but found
| | testLinkbackReceivedUuid
85 | WARNING | [ ] Line exceeds 80 characters; contains 105
| | characters
96 | WARNING | [ ] Line exceeds 80 characters; contains 122
| | characters
99 | WARNING | [ ] Line exceeds 80 characters; contains 119
| | characters
112 | WARNING | [ ] Line exceeds 80 characters; contains 88
| | characters
----------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment