- Issue created by @urvashi_vora
- šµšPhilippines paraderojether
I reviewed patch coding-standard-fixes.patch, and there are still remaining errors shown below:
FILE: /Users/studenttrainees/New/drupalorgsite/docroot/modules/contrib/doi_search/src/Controller/DoiSearchController.php
------------------------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 9 LINES
------------------------------------------------------------------------------------------------------------------------
91 | ERROR | [x] Use null coalesce operator instead of ternary operator.
110 | ERROR | [x] Use null coalesce operator instead of ternary operator.
111 | ERROR | [x] Use null coalesce operator instead of ternary operator.
115 | ERROR | [x] Use null coalesce operator instead of ternary operator.
146 | ERROR | [x] Use null coalesce operator instead of ternary operator.
166 | ERROR | [x] Use null coalesce operator instead of ternary operator.
167 | ERROR | [x] Use null coalesce operator instead of ternary operator.
168 | ERROR | [x] Use null coalesce operator instead of ternary operator.
188 | ERROR | [x] Use null coalesce operator instead of ternary operator.
------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------Time: 346ms; Memory: 10MB
Please check.
Thank You. - š®š³India Soham Sengupta
Hi, I have updated the patch with remaining error fixes
- Status changed to Needs review
over 1 year ago 7:41am 2 May 2023 - š®š³India urvashi_vora Madhya Pradesh, India
Providing interdiff between patch #0 and #3.
Also, patch #3 looks good to me.
- Status changed to Needs work
over 1 year ago 12:37pm 2 May 2023 - š®š¹Italy apaderno Brescia, š®š¹
/** * @file * Primary module hooks for DOI Publications module. - * -**/ + */
Since that comment is edited, the description for that module is Hook implementations for the DOI Publications module.
/** - * It takes a DOI and returns an array of reference data - * - * @param doi The DOI of the reference you want to retrieve. - * - * @return An array of reference data. + * It takes a DOI and returns an array of reference data. */ - private function getReferenceData($doi){ - if ($doi){ + private function getReferenceData($doi) {
The documentation comment for a method needs to contain the method short description, the parameters description, and the return value description.
- Assigned to imustakim
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 2:11pm 2 May 2023 - Status changed to Needs work
over 1 year ago 9:10pm 3 May 2023 - š®š¹Italy apaderno Brescia, š®š¹
+ * @return string + * Returns the title of the publication.
The return value description must not start with Returns.
+ * @return string + * the formatted authors.
The first word must be capitalized.
- First commit to issue fork.
- Assigned to arpitk
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 12:48pm 5 May 2023 - š®š³India arpitk
- š®š³India Raveen Kumar
Hello guys,
I have reviewed the patch #13 and it seems to be resolving the phpcs issues properly.
And Thank You. - Status changed to Needs work
5 months ago 11:45pm 22 July 2024 Hi @arpitk,
Applied the patch you provided, it was applied not-so successfully and errors were still reported. Please see below:
doi_search git:(1.0.x) ā curl https://www.drupal.org/files/issues/2023-05-05/Fixed-the-issues-reported-by-phpcs-3353332-13.patch | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 14347 100 14347 0 0 117k 0 --:--:-- --:--:-- --:--:-- 129k can't find file to patch at input line 5 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |diff --git a/README.txt b/README.txt |index 2bb2490..6516625 100644 |--- a/README.txt |+++ b/README.txt -------------------------- File to patch: README.md patching file README.md Hunk #1 FAILED at 7. 1 out of 1 hunk FAILED -- saving rejects to file README.md.rej patching file doi_search.module Hunk #1 FAILED at 2. Hunk #2 FAILED at 12. Hunk #3 FAILED at 57. 3 out of 3 hunks FAILED -- saving rejects to file doi_search.module.rej patching file src/Controller/DoiSearchController.php patching file src/DoiSearchManager.php patching file src/Form/SearchForm.php ā doi_search git:(1.0.x) ā cd .. ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig doi_search FILE: /Users/PrometInterns/Demo-site/drupal-orgissue-v9/web/modules/contrib/doi_search/README.md ------------------------------------------------------------------------------------------------ FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES ------------------------------------------------------------------------------------------------ 10 | WARNING | Line exceeds 80 characters; contains 99 characters 14 | WARNING | Line exceeds 80 characters; contains 87 characters 18 | WARNING | Line exceeds 80 characters; contains 100 characters ------------------------------------------------------------------------------------------------ FILE: /Users/PrometInterns/Demo-site/drupal-orgissue-v9/web/modules/contrib/doi_search/templates/doi-search-reference.html.twig ------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------- 23 | ERROR | [x] Expected 1 newline at end of file; 0 found ------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/PrometInterns/Demo-site/drupal-orgissue-v9/web/modules/contrib/doi_search/templates/doi-search-page.html.twig -------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------------------------- 20 | ERROR | [x] Expected 1 newline at end of file; 0 found -------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------------- FILE: /Users/PrometInterns/Demo-site/drupal-orgissue-v9/web/modules/contrib/doi_search/templates/doi-search-result.html.twig ---------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------------------------------- 33 | ERROR | [x] Expected 1 newline at end of file; 0 found ---------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------------------------------- FILE: /Users/PrometInterns/Demo-site/drupal-orgissue-v9/web/modules/contrib/doi_search/doi_search.module -------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------- 6 | ERROR | Wrong function doc comment end; expected "*/", found "**/" -------------------------------------------------------------------------------------------------------- FILE: /Users/PrometInterns/Demo-site/drupal-orgissue-v9/web/modules/contrib/doi_search/src/Controller/DoiSearchController.php ----------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------------- 9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is Drupal\doi_search\DoiSearchManager. ----------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------------------- Time: 195ms; Memory: 10MB
Kindly check
Thanks,
Jake- š®š¹Italy apaderno Brescia, š®š¹
avpaderno ā changed the visibility of the branch 3353332-fix-the-issues to hidden.