Problem/Motivation
Getting following error/warnings
FILE: /app/modules/contrib/linkicon/linkicon.info.yml
-----------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------
1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically
-----------------------------------------------------------------------------------------------------------
FILE: /app/modules/contrib/linkicon/linkicon.module
------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------------
17 | ERROR | All functions defined in a module file must be prefixed with the module's name, found "linkicon" but expected "linkicon_linkicon"
------------------------------------------------------------------------------------------------------------------------------------------------
FILE: /app/modules/contrib/linkicon/linkicon.theme.inc
--------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
--------------------------------------------------------------------------
30 | ERROR | [x] Use null coalesce operator instead of ternary operator.
33 | ERROR | [x] Use null coalesce operator instead of ternary operator.
65 | ERROR | [x] Use null coalesce operator instead of ternary operator.
--------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------
FILE: /app/modules/contrib/linkicon/src/LinkIconManager.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
63 | ERROR | [x] list(...) is forbidden, use [...] instead.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
FILE: /app/modules/contrib/linkicon/src/Plugin/Field/FieldFormatter/LinkIconFormatter.php
-----------------------------------------------------------------------------------------
FOUND 4 ERRORS AFFECTING 4 LINES
-----------------------------------------------------------------------------------------
66 | ERROR | [x] Use null coalesce operator instead of ternary operator.
67 | ERROR | [x] Use null coalesce operator instead of ternary operator.
99 | ERROR | [x] Use null coalesce operator instead of ternary operator.
100 | ERROR | [x] Use null coalesce operator instead of ternary operator.
-----------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------
FILE: /app/modules/contrib/linkicon/src/Plugin/Field/FieldFormatter/LinkIconFormatterTrait.php
----------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------
267 | ERROR | [x] Use null coalesce operator instead of ternary operator.
268 | ERROR | [x] Use null coalesce operator instead of ternary operator.
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------
Time: 1.2 secs; Memory: 12MB
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/linkicon/
Proposed resolution
Above error/warnings need to be fixed