- Status changed to Needs work
almost 2 years ago 6:22am 24 January 2023 - 🇮🇳India Charchil Khandelwal
The patch #6 has been reviewed and applied cleanly, but there are some errors and warnings.
FILE: ...p\htdocs\abc\drupal\modules\fivestar\includes\fivestar.theme.inc
----------------------------------------------------------------------
FOUND 2 ERRORS AND 2 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
8 | WARNING | [x] Unused use statement
9 | WARNING | [x] Unused use statement
11 | ERROR | [ ] Doc comment is empty
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------FILE: ...ampp\htdocs\abc\drupal\modules\fivestar\src\Element\Fivestar.php
----------------------------------------------------------------------
FOUND 7 ERRORS AFFECTING 7 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
96 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
152 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
153 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
213 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
268 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
269 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------FILE: ...vestar\src\Plugin\Field\FieldFormatter\FivestarFormatterBase.php
----------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 3 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
92 | ERROR | [x] Expected 1 space before "=>"; 0 found
94 | WARNING | [x] A comma should follow the last multiline array
| | item. Found: ]
----------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------FILE: ...l\modules\fivestar\src\Plugin\Field\FieldWidget\SelectWidget.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
47 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------FILE: ...al\modules\fivestar\src\Plugin\Field\FieldWidget\StarsWidget.php
----------------------------------------------------------------------
FOUND 4 ERRORS AND 1 WARNING AFFECTING 5 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
21 | ERROR | [x] Expected 1 space before opening brace; found 2
95 | ERROR | [x] Expected 1 space before "=>"; 0 found
97 | WARNING | [x] A comma should follow the last multiline array
| | item. Found: ]
127 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------FILE: ...:\xampp\htdocs\abc\drupal\modules\fivestar\src\WidgetManager.php
----------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 2 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but
| | found "\r\n"
64 | ERROR | [x] Use null coalesce operator instead of ternary
| | operator.
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------FILE: ...xampp\htdocs\abc\drupal\modules\fivestar\test\fivestar.base.test
----------------------------------------------------------------------
FOUND 11 ERRORS AND 1 WARNING AFFECTING 11 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
8 | ERROR | [ ] Doc comment is empty
13 | ERROR | [ ] Missing short description in doc comment
15 | ERROR | [ ] Missing @var tag in member variable comment
20 | ERROR | [ ] Missing @var tag in member variable comment
21 | ERROR | [ ] Class property $admin_user should use lowerCamel
| | naming without underscores
22 | ERROR | [ ] Missing member variable doc comment
24 | ERROR | [ ] Doc comment is empty
30 | WARNING | [ ] Unused variable $type.
30 | ERROR | [ ] The array declaration extends to column 99 (the
| | limit is 80). The array content should be split
| | up over multiple lines
31 | ERROR | [ ] The array declaration extends to column 97 (the
| | limit is 80). The array content should be split
| | up over multiple lines
38 | ERROR | [ ] Missing parameter type
----------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------FILE: ...ampp\htdocs\abc\drupal\modules\fivestar\test\fivestar.field.test
----------------------------------------------------------------------
FOUND 4 ERRORS AND 7 WARNINGS AFFECTING 11 LINES
----------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n"
| | but found "\r\n"
8 | ERROR | [ ] Doc comment is empty
13 | ERROR | [ ] Doc comment is empty
38 | WARNING | [ ] t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
39 | WARNING | [ ] t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
54 | WARNING | [ ] t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
58 | WARNING | [ ] t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
60 | WARNING | [ ] Line exceeds 80 characters; contains 92
| | characters
88 | WARNING | [x] 'TODO: we should text the data being returned.'
| | should match the format '@todo Fix problem X
| | here.'
95 | ERROR | [ ] Doc comment short description must be on a
| | single line, further text should be a separate
| | paragraph
128 | WARNING | [ ] t() calls should be avoided in classes, use
| | \Drupal\Core\StringTranslation\StringTranslationTrait
| | and $this->t() instead
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------- - Assigned to himanshu_jhaloya
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 7:54am 24 January 2023 - 🇮🇳India himanshu_jhaloya Indore
All issues are resolved adding the patch please review
- Status changed to RTBC
almost 2 years ago 8:38am 24 January 2023 - 🇮🇳India Charchil Khandelwal
Patch #9 applied cleanly, and all errors and warnings are fixed.
So moving it to RTBC.
Thanks - Status changed to Needs work
almost 2 years ago 7:42pm 28 January 2023 - 🇺🇸United States tr Cascadia
The .test files are Drupal 7 code that has not been ported to Drupal 8+ yet. These need to be ported, and should NOT be changed otherwise because that is just useless work that will be thrown away after the port. Likewise,
t()
should not be used in any test cases, and adding at()
method to make the coding standards warnings go away is just wrong.This patch tries to do too much. Some of it is right and some of it is wrong. This patch is even adding errors that didn't exist before.
With coding standards especially, I prefer to do ONE thing at a time so that it is easier to review and correct.
So please make a patch that addresses just one thing. Null coalesce, for example. Then when that is fixed we can move on to missing documentation comments.
But again the important thing here is what the testbot reports when running PHPCS on drupal.org. Running PHPCS on your own local site seems to bring up many wrong results such as "1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"". That is wrong - there is no \r\n in this code base.
- Status changed to Active
almost 2 years ago 7:33pm 28 February 2023 - 🇺🇸United States tr Cascadia
I'm turning this into a meta because there are too many unrelated things that this issue is trying to handle and because the current approach is getting nowhere.
Like I said, each issue should be handled separately. I'll start with the null coalesce issue, and I've opened up a child issue for that: 📌 Coding standards: null coalesce Fixed
Likewise, other issues should have their own child issue.
No further patches will be accepted here in this issue - this is now only for tracking the related coding standards issues.
- last update
about 1 year ago Patch Failed to Apply - last update
about 1 year ago Patch Failed to Apply - Status changed to Closed: outdated
4 months ago 7:21am 31 August 2024