Problem/Motivation
Getting following error/warnings.
FILE: /var/www/html/modules/contrib/likeit/src/Form/LikeItSettingsForm.php
-----------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------
102 | WARNING | [x] A comma should follow the last multiline array item. Found: )
-----------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------
FILE: /var/www/html/modules/contrib/likeit/src/LikeitHelper.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
427 | ERROR | The $_COOKIE super global must not be accessed directly; inject the request_stack service and use
| | $stack->getCurrentRequest()->cookies->get('likeit_session') instead
437 | ERROR | The $_COOKIE super global must not be accessed directly; inject the request_stack service and use
| | $stack->getCurrentRequest()->cookies->get('likeit_session') instead
437 | ERROR | The $_COOKIE super global must not be accessed directly; inject the request_stack service and use
| | $stack->getCurrentRequest()->cookies->get('likeit_session') instead
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Time: 2.01 secs; Memory: 6MB
Steps to reproduce
Run following command
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/likeit/
Proposed resolution
Above error/warnings need to be fixed.