Problem/Motivation
Hi, phpcs shows some issues in the code.
~/vendor/bin/phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml xero_sync
FILE: /Users/smovs/projects/drupal-org/xero_sync/tests/src/Unit/SynchronizerTest.php
------------------------------------------------------------------------------------
FOUND 12 ERRORS AFFECTING 6 LINES
------------------------------------------------------------------------------------
297 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
297 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
298 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
298 | ERROR | [x] Line indented incorrectly; expected at least 6 spaces, found 4
298 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
299 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
343 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
343 | ERROR | [x] Line indented incorrectly; expected 6 spaces, found 3
344 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
344 | ERROR | [x] Line indented incorrectly; expected at least 6 spaces, found 4
344 | ERROR | [x] Array indentation error, expected 5 spaces but found 4
345 | ERROR | [x] Spaces must be used to indent lines; tabs are not allowed
------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------
FILE: /Users/smovs/projects/drupal-org/xero_sync/tests/src/Unit/TestItemFinder.php
----------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------------------
64 | WARNING | Possible useless method overriding detected
71 | WARNING | Possible useless method overriding detected
78 | WARNING | Possible useless method overriding detected
85 | WARNING | Possible useless method overriding detected
----------------------------------------------------------------------------------
FILE: /Users/smovs/projects/drupal-org/xero_sync/tests/src/Unit/QueueJobTest.php
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES
------------------------------------------------------------------------------------------------------------------------
162 | WARNING | [x] There must be no blank line following an inline comment
172 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing
| | parentheses
209 | WARNING | [x] There must be no blank line following an inline comment
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
FILE: ...sync/modules/xero_sync_user_contact/tests/modules/xero_sync_user_contact_test/xero_sync_user_contact_test.info.yml
------------------------------------------------------------------------------------------------------------------------
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
------------------------------------------------------------------------------------------------------------------------
FILE: ...vs/projects/drupal-org/xero_sync/modules/xero_sync_user_contact/tests/src/Kernel/AdvancedQueuingProcessingTest.php
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
131 | ERROR | The array declaration extends to column 119 (the limit is 80). The array content should be split up over
| | multiple lines
------------------------------------------------------------------------------------------------------------------------
FILE: ...sers/smovs/projects/drupal-org/xero_sync/modules/xero_sync_user_contact/tests/src/Kernel/QueuingProcessingTest.php
------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
------------------------------------------------------------------------------------------------------------------------
289 | WARNING | Line exceeds 80 characters; contains 118 characters
290 | WARNING | Line exceeds 80 characters; contains 86 characters
410 | WARNING | Line exceeds 80 characters; contains 86 characters
546 | ERROR | The array declaration extends to column 85 (the limit is 80). The array content should be split up
| | over multiple lines
------------------------------------------------------------------------------------------------------------------------
FILE: /Users/smovs/projects/drupal-org/xero_sync/modules/xero_sync_user_contact/xero_sync_user_contact.services.yml
-------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------
14 | ERROR | [x] Expected 1 newline at end of file; 0 found
-------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------
FILE: ...projects/drupal-org/xero_sync/modules/xero_sync_user_contact/src/Plugin/CommerceXero/processor/CustomerContact.php
------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------
75 | ERROR | [x] Incorrect spacing between argument "$strategy" and equals sign; expected 1 but found 0
75 | ERROR | [x] Incorrect spacing between default value and equals sign for argument "$strategy"; expected 1 but
| | found 0
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------
FILE: /Users/smovs/projects/drupal-org/xero_sync/src/XeroSyncQueueJobTrait.php
------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
------------------------------------------------------------------------------
264 | ERROR | [x] Use null coalesce operator instead of ternary operator.
265 | ERROR | [x] Use null coalesce operator instead of ternary operator.
------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------
FILE: /Users/smovs/projects/drupal-org/xero_sync/src/XeroSyncItemFinder.php
---------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------
109 | ERROR | [x] Use null coalesce operator instead of ternary operator.
---------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------