Problem/Motivation

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork physical-3427873

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

chaitanyadessai created an issue. See original summary.

chaitanyadessai’s picture

Assigned: chaitanyadessai » Unassigned
Status: Active » Needs review

Please review MR.

cleavinjosh’s picture

Status: Needs review » Needs work

Hi @chaitanyadessai,

I applied MR!11 and verified that the t() calls issues have been fixed.

However, when I run phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml there are still issues found.

➜  physical git:(8.x-1.3) curl https://git.drupalcode.org/project/physical/-/merge_requests/11.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2610    0  2610    0     0   7187      0 --:--:-- --:--:-- --:--:--  7209
patching file src/Plugin/Field/FieldType/MeasurementItem.php
patching file src/Plugin/Validation/Constraint/DimensionsConstraintValidator.php
➜  physical git:(8.x-1.3) ✗ ..
➜  contrib git:(main) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml physical

FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/css/physical.admin.css
--------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------
  6 | ERROR | [x] Multiple selectors should each be on a single line
 14 | ERROR | [x] Multiple selectors should each be on a single line
--------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/tests/modules/physical_test/physical_test.routing.yml
---------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------
  8 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
 17 | WARNING | Open page callback found, please add a comment before the line why there is no access restriction
---------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/tests/modules/physical_test/src/Form/MeasurementTestForm.php
----------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------
  6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormBase.
 10 | ERROR | [x] Missing class doc comment
----------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/tests/modules/physical_test/src/Form/DimensionsTestForm.php
---------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------------------------------------
  6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Form\FormBase.
 10 | ERROR | [x] Missing class doc comment
---------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/tests/src/Unit/VolumeTest.php
---------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------
 33 | ERROR   | Doc comment short description must start with a capital letter
 37 | WARNING | Unused variable $volume.
---------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/tests/src/Unit/WeightTest.php
---------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------
 33 | ERROR   | Doc comment short description must start with a capital letter
 37 | WARNING | Unused variable $weight.
---------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/tests/src/Unit/TemperatureTest.php
--------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------
 49 | ERROR   | Doc comment short description must start with a capital letter
 53 | WARNING | Unused variable $temperature.
--------------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/tests/src/Unit/MeasurementTest.php
--------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------
 34 | ERROR   | Doc comment short description must start with a capital letter
 38 | WARNING | Unused variable $measurement.
--------------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/tests/src/Unit/LengthTest.php
---------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
---------------------------------------------------------------------------------------------------------
 33 | ERROR   | Doc comment short description must start with a capital letter
 37 | WARNING | Unused variable $length.
---------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/tests/src/Unit/AreaTest.php
-------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------
 33 | ERROR   | Doc comment short description must start with a capital letter
 37 | WARNING | Unused variable $area.
-------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/README.md
-------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------
 14 | WARNING | Line exceeds 80 characters; contains 82 characters
-------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/src/Plugin/Field/FieldWidget/MeasurementDefaultWidget.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldItemListInterface.
-------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/src/Plugin/Field/FieldWidget/DimensionsDefaultWidget.php
------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------
 6 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Field\FieldItemListInterface.
------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/src/Plugin/Field/FieldType/MeasurementItem.php
-----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------------------------------------
 12 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\StringTranslation\StringTranslationTrait.
 12 | ERROR | [x] There must be one blank line after the last USE statement; 2 found;
-----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/src/Plugin/Field/FieldFormatter/DimensionsDefaultFormatter.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------------------------------------------
 34 | ERROR | [x] Use null coalesce operator instead of ternary operator.
------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/src/Plugin/Field/FieldFormatter/MeasurementDefaultFormatter.php
-------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------------------
 34 | ERROR | [x] Use null coalesce operator instead of ternary operator.
-------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/src/Plugin/Validation/Constraint/DimensionsConstraint.php
-------------------------------------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------------------------------------
 18 | ERROR | Missing member variable doc comment
 19 | ERROR | Missing member variable doc comment
-------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/src/Plugin/Validation/Constraint/DimensionsConstraintValidator.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\StringTranslation\StringTranslationTrait.
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/src/Element/Number.php
--------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------------
 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\Core\Render\Element.
--------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/src/Calculator.php
----------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
 178 | ERROR | [x] Use null coalesce operator instead of ternary operator.
----------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------


FILE: /Users/interns/Demo-site/drupal-orgissue/web/modules/contrib/physical/src/Measurement.php
-----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
-----------------------------------------------------------------------------------------------
 244 | WARNING | Line exceeds 80 characters; contains 84 characters
 272 | WARNING | Line exceeds 80 characters; contains 91 characters
 278 | WARNING | Line exceeds 80 characters; contains 88 characters
-----------------------------------------------------------------------------------------------

Time: 749ms; Memory: 12MB

➜  contrib git:(main) ✗

Thank you.

silvi.addweb made their first commit to this issue’s fork.

silvi.addweb’s picture

Status: Needs work » Needs review

Hi, I have fix some phpcs issue, Please review.

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

jsacksick’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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