Problem/Motivation

phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig .

FILE: .../web/modules/custom/focal_point/tests/src/Unit/FocalPointManagerTest.php
-----------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------
67 | ERROR | The array declaration extends to column 81 (the limit is 80). The array content should be split up over
| | multiple lines
68 | ERROR | The array declaration extends to column 89 (the limit is 80). The array content should be split up over
| | multiple lines
69 | ERROR | The array declaration extends to column 84 (the limit is 80). The array content should be split up over
| | multiple lines
-----------------------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/focal_point/tests/src/Unit/FieldWidgets/FocalPointFieldWidgetTest.php
-----------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------
123 | ERROR | The array declaration extends to column 81 (the limit is 80). The array content should be split up over
| | multiple lines
124 | ERROR | The array declaration extends to column 89 (the limit is 80). The array content should be split up over
| | multiple lines
125 | ERROR | The array declaration extends to column 84 (the limit is 80). The array content should be split up over
| | multiple lines
-----------------------------------------------------------------------------------------------------------------------

FILE: .../web/modules/custom/focal_point/tests/src/Unit/Effects/FocalPointEffectsTest.php
-----------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------------------------------
105 | ERROR | The array declaration extends to column 105 (the limit is 80). The array content should be split up
| | over multiple lines
153 | ERROR | The array declaration extends to column 105 (the limit is 80). The array content should be split up
| | over multiple lines
159 | ERROR | The array declaration extends to column 105 (the limit is 80). The array content should be split up
| | over multiple lines
-----------------------------------------------------------------------------------------------------------------------

Steps to reproduce

phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig .

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

alyaj2a created an issue. See original summary.

alyaj2a’s picture

Assigned: Unassigned » alyaj2a

alyaj2a’s picture

Assigned: alyaj2a » Unassigned
Status: Active » Needs review

avpaderno made their first commit to this issue’s fork.

avpaderno’s picture

avpaderno changed the visibility of the branch 3472665-gitlab-ci-reports to hidden.

alyaj2a’s picture

Hello avpaderno, I uploaded the corrections that I indicated in this issue appeared to me with PHPCS.

svendecabooter’s picture

Status: Needs review » Needs work

Latest commits in 2.x have failing PHPCS jobs, so that still needs fixing.

liam morland made their first commit to this issue’s fork.

liam morland’s picture

Status: Needs work » Needs review

All phpcs tests now pass.

#3513518: Fix PHP 8.4 deprecation should be merged first.

paraderojether’s picture

Status: Needs review » Needs work

Hi

I reviewed MR!2, and confirmed PHPCS is now passed on Gitlab CI.

However there are still remaining phpcs issues reported by PHP_CodeSniffer

Jether@PrometSources-MacBook-Pro-4 focal_point % curl https://git.drupalcode.org/project/focal_point/-/merge_requests/39.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4748    0  4748    0     0  10387      0 --:--:-- --:--:-- --:--:-- 10389
patching file 'src/Controller/FocalPointPreviewController.php'
patching file 'tests/src/Unit/Effects/FocalPointEffectsTest.php'
patching file 'tests/src/Unit/FieldWidgets/FocalPointFieldWidgetTest.php'
patching file 'tests/src/Unit/FocalPointManagerTest.php'
Jether@PrometSources-MacBook-Pro-4 focal_point % cd ..
Jether@PrometSources-MacBook-Pro-4 contrib % phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,twig focal_point

FILE: /Users/Jether/Q1/q1issues/web/modules/contrib/focal_point/tests/src/Functional/FocalPointWidgetTest.php
-----------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------
 84 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
-----------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/Jether/Q1/q1issues/web/modules/contrib/focal_point/focal_point.module
----------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------
 65 | WARNING | Unused variable $key.
----------------------------------------------------------------------------------


FILE: /Users/Jether/Q1/q1issues/web/modules/contrib/focal_point/src/Plugin/migrate/process/FocalPointToCropField.php
--------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------
 79 | WARNING | Exceptions should not be translated
--------------------------------------------------------------------------------------------------------------------


FILE: /Users/Jether/Q1/q1issues/web/modules/contrib/focal_point/src/EventSubscriber/MigrationSubscriber.php
-------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------
 94 | ERROR | unserialize() is insecure unless allowed classes are limited. Use a safe format like JSON or use the allowed_classes option.
-------------------------------------------------------------------------------------------------------------------------------------------

Time: 383ms; Memory: 16MB

Jether@PrometSources-MacBook-Pro-4 contrib %

Kindly check and advise, please.
Thank you.

avpaderno’s picture

Status: Needs work » Needs review

If GitLab CI does not report any PHP_CodeSniffer errors/warnings, all the errors/warnings have been fixed. Running PHP_CodeSniffer locally requires to use the same configuration GitLab CI uses.

paraderojether’s picture

Status: Needs review » Reviewed & tested by the community

Hi avpaderno,

Noted on that, moving this now to RBTC since PHPCS is passed in GitLab CI.

Thank you.

liam morland’s picture

rajeshreeputra made their first commit to this issue’s fork.

rajeshreeputra’s picture

Status: Reviewed & tested by the community » Fixed

MR merged!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.