- Issue created by @dineshkumarbollu
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 5:58am 13 April 2023 - Status changed to Needs work
over 1 year ago 3:51pm 13 April 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
+- **Key:** The key of the property element to which the attributes +should be added.
The indentation of the second line is wrong. There are other changes that are wrong for the same reason.
- 🇮🇳India Akram Khan Cuttack, Odisha
added updated patch and address #4 and it fixed all PHPCS issues
- 🇮🇹Italy apaderno Brescia, 🇮🇹
- {{ content.field_image|add_attr('image_attributes', {class: ['custom-class']}) }} + {{ content.field_image|add_attr('image_attributes', + {class: ['custom-class']}) }}
It is better to leave that as one-line code.
- 🇮🇳India Akram Khan Cuttack, Odisha
hi @apaderno but if i change it to one-line code. it'll give phpcs warning
-------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
34 | WARNING | Line exceeds 80 characters; contains 85 characters
------------------------------------------------------------------------------------------------------- - 🇮🇹Italy apaderno Brescia, 🇮🇹
@Akram Just ignore it. Coding standards do not say that lines must be shorter than 81 characters. There are quite few cases where splitting the code over two or more lines is wrong.
This is what Line length and wrapping → , part of the Drupal coding standards says. (Emphasis is mine.)
- Lines containing longer function names, function/class definitions, variable declarations, etc are allowed to exceed 80 characters.
- Control structure conditions may exceed 80 characters, if they are simple to read and understand.
A tool is not able to understand what is better, and it can be ignored in such cases.
- Status changed to Needs review
over 1 year ago 8:42am 15 April 2023 - Status changed to RTBC
over 1 year ago 6:57pm 15 April 2023 -
rlhawk →
committed 55a7a9b5 on 2.0.x authored by
Akram Khan →
Issue #3353902 by Akram Khan, dineshkumarbollu, apaderno, rlhawk: Fix...
-
rlhawk →
committed 55a7a9b5 on 2.0.x authored by
Akram Khan →
- 🇺🇸United States rlhawk Seattle, Washington, United States
I made a slight adjustment to the one example line to bring it below 80 characters. I also made some minor changes to the top two paragraphs. I will cherry pick these changes to the 8.x-1.x branch.
-
rlhawk →
committed a93a4372 on 8.x-1.x authored by
Akram Khan →
Issue #3353902 by Akram Khan, dineshkumarbollu, apaderno, rlhawk: Fix...
-
rlhawk →
committed a93a4372 on 8.x-1.x authored by
Akram Khan →
- Status changed to Fixed
over 1 year ago 7:14pm 29 April 2023 Automatically closed - issue fixed for 2 weeks with no activity.