Problem/Motivation
FILE: /Users/projects/drupal-d10/modules/contrib/media_entity_soundcloud/tests/src/Functional/SoundcloudEmbedFormatterTest.php
--------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------------------------------------
64 | WARNING | Unused variable $entity_display_repository.
--------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /Users/projects/drupal-d10/modules/contrib/media_entity_soundcloud/src/Form/SoundcloudForm.php
------------------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------
122 | ERROR | [x] Expected "void|true" but found "void|TRUE" for function return type
122 | ERROR | [ ] @return doc comment specified, but function has no return statement
122 | ERROR | [ ] Description for the @return value is missing
152 | ERROR | [x] Expected 1 blank line after function; 0 found
153 | ERROR | [x] The closing brace for the class must have an empty line before it
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
FILE: /Users/projects/drupal-d10/modules/contrib/media_entity_soundcloud/src/Plugin/Field/FieldFormatter/SoundcloudEmbedFormatter.php
---------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------------------------------
76 | WARNING | Avoid backslash escaping in translatable strings when possible, use "" quotes instead
162 | WARNING | Avoid backslash escaping in translatable strings when possible, use "" quotes instead
---------------------------------------------------------------------------------------------------------------------------------------------------------
Time: 145ms; Memory: 10MB
Steps to reproduce
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml media_entity_soundcloud
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
adil_siddiqui commentedPatch created
Comment #3
indrapatil commentedI am reviewing it
Comment #4
indrapatil commented@Adil_Siddiqui patch applied successfully without errors, So moving to RTBC.
Comment #5
avpadernoKeep in mind that the correct issue tag for these issues is Coding standards.
Comment #6
avpadernoSince the test is using the following code, it is probably better to change the other lines, instead of removing that line.
Comment #7
adil_siddiqui commentedThe below variable is not required as it is just declared and not used anywhere hence it is removed in the patch.
$entity_display_repository = \Drupal::service('entity_display.repository');Comment #8
kunalgautam commentedUpdated patch accordingly
Comment #9
avpadernoComment #10
rajeshreeputraCan we get the MR for quick review and merge.
Comment #12
cleavinjosh commentedHi @kkalashnikov,
I applied your patch, it was applied smoothly. However I still encountered some issues after I ran
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml..
Thank you.
Comment #14
cleavinjosh commentedHi,
Please review MR!15. Thank you.
Comment #15
avpadernoMR !5 fixed all the PHP_CodeSniffer errors/warnings reported by GitLab CI.
Comment #17
rajeshreeputraFixed!