- Issue created by @chaitanyadessai
- last update
about 1 year ago 22 pass - Issue was unassigned.
- Status changed to Needs review
about 1 year ago 3:04pm 14 March 2024 - Status changed to Needs work
11 months ago 10:07am 23 May 2024 - ๐ต๐ญPhilippines cleavinjosh
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.
- ๐ฎ๐ณIndia dev16.addweb
silvi.addweb โ made their first commit to this issueโs fork.
- last update
10 months ago 22 pass - Status changed to Needs review
10 months ago 11:16am 17 June 2024 - ๐ฎ๐ณIndia dev16.addweb
Hi, I have fix some phpcs issue, Please review.
- First commit to issue fork.
-
jsacksick โ
committed 9f307c2b on 8.x-1.x authored by
chaitanyadessai โ
Issue #3427873: t() calls should be avoided in classes
-
jsacksick โ
committed 9f307c2b on 8.x-1.x authored by
chaitanyadessai โ
- Status changed to Fixed
9 months ago 9:05am 23 July 2024 Automatically closed - issue fixed for 2 weeks with no activity.