- Issue created by @Shanu Chouhan
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 11:33am 11 May 2023 - Status changed to Needs work
9 months ago 12:28pm 7 March 2024 - š®š³India Ashutosh Ahirwal India
Hi, Provided patch in #2 is not getting apply and throwing error.
Moving to need work. - Status changed to Needs review
9 months ago 4:23am 8 March 2024 - Status changed to Needs work
9 months ago 4:35am 8 March 2024 - š®š³India pray_12
Hi ,
Applied MR1 found few more errors and warnings that need to be resolved.FILE: .../multi_image_formatter/src/Controller/AssetFormatController.php ---------------------------------------------------------------------------- FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES ---------------------------------------------------------------------------- 29 | WARNING | [ ] Line exceeds 80 characters; contains 92 characters 60 | WARNING | [x] A comma should follow the last multiline array item. | | Found: ) 76 | ERROR | [x] Additional blank lines found at end of doc comment 79 | WARNING | [ ] MediaType::load calls should be avoided in classes, use | | dependency injection instead ---------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------- FILE: ../multi_image_formatter/src/Routing/RouteSubscriber.php ---------------------------------------------------------------------------- FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES ---------------------------------------------------------------------------- 32 | WARNING | [ ] Line exceeds 80 characters; contains 83 characters 78 | ERROR | [x] Concat operator must be surrounded by a single space ---------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------- FILE: ...mage_formatter/src/Plugin/Field/FieldFormatter/MultiImageFormatter.php ---------------------------------------------------------------------------- FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES ---------------------------------------------------------------------------- 46 | WARNING | [ ] Line exceeds 80 characters; contains 106 characters 221 | ERROR | [x] Expected 1 blank line after function; 0 found 222 | ERROR | [x] The closing brace for the class must have an empty | | line before it ---------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------- FILE: .../multi_image_formatter/multi_image_formatter.module ---------------------------------------------------------------------------- FOUND 2 ERRORS AND 4 WARNINGS AFFECTING 6 LINES ---------------------------------------------------------------------------- 14 | ERROR | [x] Use statements should be sorted alphabetically. The | | first wrong one is Drupal\media\Entity\MediaType. 24 | WARNING | [x] A comma should follow the last multiline array item. | | Found: ] 25 | WARNING | [x] A comma should follow the last multiline array item. | | Found: ] 53 | WARNING | [x] A comma should follow the last multiline array item. | | Found: FALSE 58 | WARNING | [x] A comma should follow the last multiline array item. | | Found: FALSE 89 | ERROR | [x] Namespaced classes/interfaces/traits should be | | referenced with use statements ---------------------------------------------------------------------------- PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------
- š®š³India pray_12
Hi,
fixed few errors and warnings.
Remaining errors that need to be addressed areFILE: .../multi_image_formatter/src/Controller/AssetFormatController.php ---------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES ---------------------------------------------------------------------------- 29 | WARNING | Line exceeds 80 characters; contains 92 characters 78 | WARNING | MediaType::load calls should be avoided in classes, use | | dependency injection instead ---------------------------------------------------------------------------- FILE: ...multi_image_formatter/src/Routing/RouteSubscriber.php ---------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------- 32 | WARNING | Line exceeds 80 characters; contains 83 characters ---------------------------------------------------------------------------- FILE: ...mage_formatter/src/Plugin/Field/FieldFormatter/MultiImageFormatter.php ---------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------- 46 | WARNING | Line exceeds 80 characters; contains 106 characters ----------------------------------------------------------------------------
- Status changed to Needs review
9 months ago 10:40am 8 March 2024 - šµšPhilippines clarkssquared
Hi
I applied MR !1 and I confirmed that it fixes most of the PHPCS issues of hte module, however there are PHPCS issues regarding line exceeds 80 characters, hence I will retain the status to needs review so that others can review if these remaining PHPCS issues should be fixed or not.
ā multi_image_formatter git:(1.0.x) curl https://git.drupalcode.org/project/multi_image_formatter/-/merge_requests/1.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 24368 0 24368 0 0 27217 0 --:--:-- --:--:-- --:--:-- 27472 patching file README.md patching file 'config/install/core.entity_form_mode.media.asset_edit.yml' patching file 'config/install/core.entity_view_mode.media.asset_format.yml' patching file multi_image_formatter.info.yml patching file multi_image_formatter.module patching file 'src/Controller/AssetFormatController.php' patching file 'src/Plugin/Field/FieldFormatter/MultiImageFormatter.php' patching file 'src/Routing/RouteSubscriber.php' ā multi_image_formatter git:(1.0.x) ā .. ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml multi_image_formatter FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/multi_image_formatter/src/Plugin/Field/FieldFormatter/MultiImageFormatter.php ------------------------------------------------------------------------------------------------------------------------------------------------------ FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------------------------------ 46 | WARNING | Line exceeds 80 characters; contains 106 characters ------------------------------------------------------------------------------------------------------------------------------------------------------ FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/multi_image_formatter/src/Controller/AssetFormatController.php --------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES --------------------------------------------------------------------------------------------------------------------------------------- 11 | WARNING | [x] Unused use statement 38 | WARNING | [ ] Line exceeds 80 characters; contains 92 characters --------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/multi_image_formatter/src/Routing/RouteSubscriber.php ------------------------------------------------------------------------------------------------------------------------------ FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------ 32 | WARNING | Line exceeds 80 characters; contains 83 characters ------------------------------------------------------------------------------------------------------------------------------ Time: 350ms; Memory: 10MB ā contrib git:(master) ā
- š®š¹Italy apaderno Brescia, š®š¹
GitLab CI shows the following errors/warnings.
FILE: ...dules/custom/multi_image_formatter-3359633/src/Routing/RouteSubscriber.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 32 | WARNING | Line exceeds 80 characters; contains 83 characters | | (Drupal.Files.LineLength.TooLong) -------------------------------------------------------------------------------- FILE: ..._formatter-3359633/src/Plugin/Field/FieldFormatter/MultiImageFormatter.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 46 | WARNING | Line exceeds 80 characters; contains 106 characters | | (Drupal.Files.LineLength.TooLong) -------------------------------------------------------------------------------- FILE: ...tom/multi_image_formatter-3359633/src/Controller/AssetFormatController.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES -------------------------------------------------------------------------------- 11 | WARNING | [x] Unused use statement | | (Drupal.Classes.UnusedUseStatement.UnusedUse) 38 | WARNING | [ ] Line exceeds 80 characters; contains 92 characters | | (Drupal.Files.LineLength.TooLong) -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- Time: 171ms; Memory: 6MB
- š®š¹Italy apaderno Brescia, š®š¹
- š®š³India Yashaswi18
On running the command "
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css
", found no phpcs errors or warnings remaining. - Status changed to RTBC
5 months ago 6:13am 27 June 2024