- Issue created by @urvashi_vora
- Status changed to RTBC
over 1 year ago 12:58pm 28 April 2023 - Status changed to Needs work
over 1 year ago 9:45am 29 April 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
The patch could apply, but that does not mean it is correct.
- $url = Url::fromRoute('content_close.page', ['time' => $time, 'content_type' => $content_type])->toString(); + $url = Url::fromRoute('content_close.page', + [ + 'time' => $time, + 'content_type' => $content_type, + ])->toString();
Lines are allowed to be longer than 80 characters, as long as they are easier to read. In this case, the changed code is not easier to read; the code should stay as it was.
/** - * ContentCloseController class. + * Impements ContentCloseController class. */ class ContentCloseController extends ControllerBase {
No, the short description for a class does not start with Implements. A class does not implement itself.
Furthermore, that short description is just repeating the class name. It does not say anything about the class purpose. - Status changed to Needs review
over 1 year ago 10:42am 22 June 2023 - 🇮🇳India Ashutosh Ahirwal India
Hi
I have tried to fix the issue according to #3.
please review. - Status changed to Needs work
over 1 year ago 12:43pm 22 June 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
- $url = Url::fromRoute('content_close.page', ['time' => $time, 'content_type' => $content_type])->toString(); + $url = Url::fromRoute('content_close.page', [ + 'time' => $time, 'content_type' => $content_type, + ])->toString();
Yet, the existing code is easier to understand.
/** - * ContentCloseController class. + * Class to provide functionality for ContentCloseController. */
No, a class does not provide functionality for itself. Classes provide functionality for any class/function using them. Since that is what any class does, a description like that is not helpful.
/** - * ContentCloseForm close. + * Class to build the Content Close Form. */
Only the first word must be capitalized.
I am not sure that description is sufficient. content close form does not say me much. - Assigned to nitin_lama
- 🇮🇳India nitin_lama India
Addressed #5.
For #5.1 i get it that the previous code is easier to understand but as per php code sniffer this has to be fixed since the array declaration extends to column 100 (the limit is 80).FILE: ...ontribution/drupal9/web/modules/contrib/content_close/content_close.module -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 42 | ERROR | The array declaration extends to column 100 (the limit is 80). | | The array content should be split up over multiple lines
Providing updated patch.
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 10:52am 23 June 2023 - Status changed to Needs work
over 1 year ago 3:42pm 23 June 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
if ($content_type == $form_id && $time < $request_time) { - $url = Url::fromRoute('content_close.page', ['time' => $time, 'content_type' => $content_type])->toString(); + $url = Url::fromRoute('content_close.page', [ + 'time' => $time, + 'content_type' => $content_type, + ])->toString();
Code lines are not required to be shorter than 81 characters. Line length and wrapping → , part of the Drupal coding standards, says:
- 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.
(Emphasis is mine.)
The existing code is easier to understand.
</code> <code> /** - * ContentCloseController class. + * Controller class to implement content and return theme with values. */
That is not a correct description, since a controller class does not implement content not return "theme with values." If that were a correct description, it would be too generic; the description must say what exactly that class does.
/** - * ContentCloseForm close. + * Content close configuration form. */ class ContentCloseForm extends ConfigFormBase {
That description is as clear as the existing description. Content close configuration is not a set phrase, which means it does not have any meaning that makes clear what that class purpose is.
- Assigned to nitin_lama
- First commit to issue fork.
- Merge request !1Addressed review comment and moved patch to PR. → (Merged) created by Unnamed author
- Issue was unassigned.
- First commit to issue fork.
-
mahtab_alam →
committed 77c45245 on 8.x-1.x authored by
bharath-kondeti →
Issue #3357104 by nitin_lama: Fix the issues reported by phpcs
-
mahtab_alam →
committed 77c45245 on 8.x-1.x authored by
bharath-kondeti →
- Status changed to Fixed
11 months ago 7:07am 26 December 2023 Automatically closed - issue fixed for 2 weeks with no activity.