Problem/Motivation
There are some Drupal coding standard errors which needs to to be fixed.
Steps to reproduce
Fixed using php codesniffer
my_site_name_dir % vendor/squizlabs/php_codesniffer/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/tweetable_text_for_ckeditor
FILE: /sample/my_site_name_dir/web/modules/contrib/tweetable_text_for_ckeditor/css/tweetabletext.css
--------------------------------------------------------------------------------------------------------------------------
FOUND 15 ERRORS AFFECTING 14 LINES
--------------------------------------------------------------------------------------------------------------------------
2 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
3 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
4 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
5 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
6 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
7 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
9 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
9 | ERROR | [x] Expected 1 space after colon in style definition; 0 found
10 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
11 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
12 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
13 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
14 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
15 | ERROR | [x] Line indented incorrectly; expected 2 spaces, found 6
16 | ERROR | [x] Line indented incorrectly; expected 0 spaces, found 2
--------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 15 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------
FILE: /sample/my_site_name_dir/web/modules/contrib/tweetable_text_for_ckeditor/tweetable_text_ckeditor.module
-----------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------
12 | ERROR | [x] Opening brace should be on the same line as the declaration
-----------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------
FILE: /sample/my_site_name_dir/web/modules/contrib/tweetable_text_for_ckeditor/libraries/css/tweetabletext.css
------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------
4 | ERROR | [x] CSS colours must be defined in lowercase; expected #4099ff but found #4099FF
------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------
FILE: /sample/my_site_name_dir/web/modules/contrib/tweetable_text_for_ckeditor/libraries/README.md
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------
54 | WARNING | [ ] Line exceeds 80 characters; contains 94 characters
55 | ERROR | [x] Expected 1 newline at end of file; 4 found
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
FILE: /sample/my_site_name_dir/web/modules/contrib/tweetable_text_for_ckeditor/tweetable_text_ckeditor.info.yml
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-------------------------------------------------------------------------------------------------------------------------------------
FILE: /sample/my_site_name_dir/web/modules/contrib/tweetable_text_for_ckeditor/README.txt
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Expected 1 newline at end of file; 2 found
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------
Time: 186ms; Memory: 8MB
Comments
Comment #2
meghasharma commentedFixed all the errors: please review the patch
Comment #3
meghasharma commentedComment #4
msutharsComment #5
imalabyaPlease fix DrupalPractice issues as well.
Comment #6
meghasharma commentedplease review
Comment #7
imalabyaLooks good, thanks @meghasharma
Comment #8
msuthars@imalabya Thanks for reviewing the patch. From next time please check that if an issue is already assigned to someone, that means he/she already is working/reviewing the issue. The feature Assigned is there to check if someone working or not on the issue.
Comment #9
rahul.shinde@meghasharma, Please address the following,
Please remove use statement as this is not used.
Comment #10
meghasharma commentedplease review
Comment #11
rahul.shindeThanks @meghasharma.
Changes looks good to me.
Comment #12
vishnukumar commentedThanks @meghasharma
@rahul.shinde @msuthars @imalabya
Comment #14
vishnukumar commented