Remove PHPCS error as per Drupal standard:
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md --ignore=node_modules,bower_components,vendor floating_block
FILE: ...dules/contrib/floating_block/src/Tests/FloatingBlockUnitTest.php
----------------------------------------------------------------------
FOUND 20 ERRORS AFFECTING 12 LINES
----------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should
| | not begin with a file doc comment
12 | ERROR | [x] Missing class doc comment
19 | ERROR | [x] Short array syntax must be used to define arrays
21 | ERROR | [x] Missing function doc comment
22 | ERROR | [x] Short array syntax must be used to define arrays
32 | ERROR | [x] Visibility must be declared on method "setUp"
40 | ERROR | [x] Visibility must be declared on method
| | "testBlockExampleBasic"
44 | ERROR | [x] Short array syntax must be used to define arrays
50 | ERROR | [x] Short array syntax must be used to define arrays
50 | ERROR | [x] Short array syntax must be used to define arrays
56 | ERROR | [x] Short array syntax must be used to define arrays
56 | ERROR | [x] Short array syntax must be used to define arrays
62 | ERROR | [ ] If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
62 | ERROR | [x] Short array syntax must be used to define arrays
62 | ERROR | [ ] If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
62 | ERROR | [x] Short array syntax must be used to define arrays
68 | ERROR | [ ] If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
68 | ERROR | [x] Short array syntax must be used to define arrays
68 | ERROR | [x] Short array syntax must be used to define arrays
68 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...l/vimeo/modules/contrib/floating_block/src/Form/SettingsForm.php
----------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should
| | not begin with a file doc comment
22 | ERROR | [x] Short array syntax must be used to define arrays
28 | ERROR | [ ] Public method name "SettingsForm::getFormID" is not
| | in lowerCamel format
37 | ERROR | [x] Short array syntax must be used to define arrays
57 | ERROR | [x] Short array syntax must be used to define arrays
57 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: .../vimeo/modules/contrib/floating_block/floating_block.routing.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
7 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: .../html/vimeo/modules/contrib/floating_block/floating_block.module
----------------------------------------------------------------------
FOUND 18 ERRORS AND 1 WARNING AFFECTING 18 LINES
----------------------------------------------------------------------
6 | ERROR | [ ] Doc comment short description must be on a
| | single line, further text should be a separate
| | paragraph
10 | 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."
10 | ERROR | [x] Doc comment short description must end with a
| | full stop
25 | ERROR | [x] Namespaced classes/interfaces/traits should be
| | referenced with use statements
31 | ERROR | [x] Case breaking statements must be followed by a
| | single blank line
37 | ERROR | [x] Short array syntax must be used to define arrays
57 | ERROR | [x] Short array syntax must be used to define arrays
61 | ERROR | [x] Short array syntax must be used to define arrays
81 | ERROR | [ ] Type hint "array" missing for $floating_blocks
82 | ERROR | [x] Short array syntax must be used to define arrays
86 | ERROR | [x] Short array syntax must be used to define arrays
98 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found
99 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found
101 | ERROR | [x] Short array syntax must be used to define arrays
104 | ERROR | [x] Short array syntax must be used to define arrays
105 | ERROR | [x] Short array syntax must be used to define arrays
107 | ERROR | [x] Short array syntax must be used to define arrays
108 | ERROR | [x] Short array syntax must be used to define arrays
109 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 63ms; Memory: 6Mbphpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md --ignore=node_modules,bower_components,vendor floating_block
FILE: ...dules/contrib/floating_block/src/Tests/FloatingBlockUnitTest.php
----------------------------------------------------------------------
FOUND 20 ERRORS AFFECTING 12 LINES
----------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should
| | not begin with a file doc comment
12 | ERROR | [x] Missing class doc comment
19 | ERROR | [x] Short array syntax must be used to define arrays
21 | ERROR | [x] Missing function doc comment
22 | ERROR | [x] Short array syntax must be used to define arrays
32 | ERROR | [x] Visibility must be declared on method "setUp"
40 | ERROR | [x] Visibility must be declared on method
| | "testBlockExampleBasic"
44 | ERROR | [x] Short array syntax must be used to define arrays
50 | ERROR | [x] Short array syntax must be used to define arrays
50 | ERROR | [x] Short array syntax must be used to define arrays
56 | ERROR | [x] Short array syntax must be used to define arrays
56 | ERROR | [x] Short array syntax must be used to define arrays
62 | ERROR | [ ] If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
62 | ERROR | [x] Short array syntax must be used to define arrays
62 | ERROR | [ ] If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
62 | ERROR | [x] Short array syntax must be used to define arrays
68 | ERROR | [ ] If the line declaring an array spans longer than 80
| | characters, each element should be broken into its
| | own line
68 | ERROR | [x] Short array syntax must be used to define arrays
68 | ERROR | [x] Short array syntax must be used to define arrays
68 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 17 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: ...l/vimeo/modules/contrib/floating_block/src/Form/SettingsForm.php
----------------------------------------------------------------------
FOUND 6 ERRORS AFFECTING 5 LINES
----------------------------------------------------------------------
3 | ERROR | [x] Namespaced classes, interfaces and traits should
| | not begin with a file doc comment
22 | ERROR | [x] Short array syntax must be used to define arrays
28 | ERROR | [ ] Public method name "SettingsForm::getFormID" is not
| | in lowerCamel format
37 | ERROR | [x] Short array syntax must be used to define arrays
57 | ERROR | [x] Short array syntax must be used to define arrays
57 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: .../vimeo/modules/contrib/floating_block/floating_block.routing.yml
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
7 | ERROR | [x] Expected 1 newline at end of file; 0 found
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: .../html/vimeo/modules/contrib/floating_block/floating_block.module
----------------------------------------------------------------------
FOUND 18 ERRORS AND 1 WARNING AFFECTING 18 LINES
----------------------------------------------------------------------
6 | ERROR | [ ] Doc comment short description must be on a
| | single line, further text should be a separate
| | paragraph
10 | 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."
10 | ERROR | [x] Doc comment short description must end with a
| | full stop
25 | ERROR | [x] Namespaced classes/interfaces/traits should be
| | referenced with use statements
31 | ERROR | [x] Case breaking statements must be followed by a
| | single blank line
37 | ERROR | [x] Short array syntax must be used to define arrays
57 | ERROR | [x] Short array syntax must be used to define arrays
61 | ERROR | [x] Short array syntax must be used to define arrays
81 | ERROR | [ ] Type hint "array" missing for $floating_blocks
82 | ERROR | [x] Short array syntax must be used to define arrays
86 | ERROR | [x] Short array syntax must be used to define arrays
98 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found
99 | ERROR | [x] Expected 1 space(s) before asterisk; 2 found
101 | ERROR | [x] Short array syntax must be used to define arrays
104 | ERROR | [x] Short array syntax must be used to define arrays
105 | ERROR | [x] Short array syntax must be used to define arrays
107 | ERROR | [x] Short array syntax must be used to define arrays
108 | ERROR | [x] Short array syntax must be used to define arrays
109 | ERROR | [x] Short array syntax must be used to define arrays
----------------------------------------------------------------------
PHPCBF CAN FIX THE 16 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
Time: 63ms; Memory: 6Mb
phpcs --standard=DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md --ignore=node_modules,bower_components,vendor floating_block
FILE: ...l/vimeo/modules/contrib/floating_block/src/Form/SettingsForm.php
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
39 | WARNING | t() calls should be avoided in classes, use
| | dependency injection and $this->t() instead
41 | WARNING | t() calls should be avoided in classes, use
| | dependency injection and $this->t() instead
----------------------------------------------------------------------
FILE: ...tml/vimeo/modules/contrib/floating_block/floating_block.info.yml
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
6 | WARNING | All dependencies must be prefixed with the project
| | name, for example "drupal:"
----------------------------------------------------------------------
Time: 27ms; Memory: 4Mb
| Comment | File | Size | Author |
|---|
Issue fork floating_block-2956970
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
neeraprajapati commentedApplied patch for fixing phpcs errors.
Comment #3
neeraprajapati commentedComment #4
kleiton_rodrigues commentedComment #5
kleiton_rodrigues commentedfollows new patch
moving to RTBC
Comment #6
kleiton_rodrigues commentedComment #7
kleiton_rodrigues commentedComment #8
dqdPlease do not tag an issue patched by yourself as RTBC. It needs review of other users to become RTBC. Thanks for the hard work on it.
Comment #9
megachriz@diqidoq
It would be cool if automated tests are configured for the 8.x-1.x branch. Then we can see on the testbot if all code styles issues are indeed fixed with the patch.
Comment #10
dqdDrupalCI testing is supported by Drupal Association members and supporting partners. See the DrupalCI documentation for more information. Testing costs $3-4k each month, so tests should be only configured on larger projects if really needed and should be considered carefully in respect for the whole community.
I rated Floating Block project in its size not as large enough in its whole scale and possible danger to break things in comparison to other projects, so I decided to keep the project out of the test environment.
But I will consider your recommendation and will communicate with the other maintainers about a possible compromise. Maybe weekly or monthly tests only.
EDIT: opened #3244396: [META] Test bot settings for the Floating Block project issue queue for tracking and opened D9 testing for the 8.x branch for now.
Comment #11
dqdNeeds a possible reroll against latest dev in the next days.
Comment #12
megachrizReroll. Depends on #3244563: Convert FloatingBlockUnitTest to PHPUnit unit test and move API functions to a service, therefore compared to the patch in #5, some CS fixes are no longer included in this one (it didn't make sense to me to add CS fixes to code that is removed by that other issue).
Comment #13
megachrizApparently, this needs a reroll again.
Comment #15
megachrizLet's try that again, now using an issue fork so I can easily push more code if needed.
Comment #16
dqdErrrm... sorry @MegaChriz: I pushed already #2956921: Turn off functionality at small browser widths so this may have caused
I have seen the numbers of the diffs so maybe this here would have been better pushed before but I was OFF from the issue queue for 2 days and lost the overview. Would you mind to reroll one more time. It would take less time from your side where you are at than to revert commits and pushes etc. And I am not sure if it would break the chain from the other side then.
Comment #17
megachrizI could probably take a look at that tomorrow morning. :)
Comment #18
megachrizI rebased the issue fork on the latest dev. There were no merge conflicts. Back to "Needs review".
Comment #19
dqd@MegaChriz: you rock! +1
Not broken functionality or error reports on a D8 and D9 test env found.
Comment #21
dqd