- Issue created by @anmolgoyal74
- Status changed to Needs review
over 1 year ago 6:55pm 18 October 2023 - 🇮🇳India keshav patel
The provided patch file "fix_coding_standards-3394540-4.patch", fixes the
--standard=Drupal,DrupalPractice
issues reported byphpcs
. - Status changed to Needs work
over 1 year ago 7:17pm 18 October 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
- * Class ResendController. + * Implements ResendController Class.
Adding Implements does not change the fact the description is merely repeating the class name. That comment also became not correct, as a class does not implement itself.
+ /** + * Implements MessengerInterface. + * + * @var Drupal\Core\Messenger\MessengerInterface + */ protected $messenger;
A property description must describe what the property is, not which interfaces it implements, which is information already given in the
@var
line.+ /** + * Construct a new ResendController object. + */ public function __construct(MessengerInterface $messenger) { $this->messenger = $messenger; }
The documentation comment for constructors is not mandatory anymore, If it is given, the description must be Constructs a new [class name] object. where [class name] includes the class namespace. The parameter descriptions must be included too.
- $this->logger->notice('Password reset instructions mailed to %name at %email.', ['%name' => $account->getAccountName(), '%email' => $account->getEmail()]); + $this->logger->notice('Password reset instructions mailed to %name at %email.', + [ + '%name' => $account->getAccountName(), + '%email' => $account->getEmail(), + ]);
Code lines can exceed the 80 characters, if they are easier to understand. The existing code is easier to understand.
+ * @param \Drupal\user\UserStorageInterface $user_storage + * User storage.
The description is missing a definite article.
- Status changed to Needs review
about 1 year ago 7:28pm 20 October 2023 - 🇮🇳India keshav patel
Revised the Patch "fix_coding_standards-3394540-4.patch" as per Comment #5. The patch file "fix_coding_standards-3394540-6.patch" fixes the issues reported by phpcs in accordance with Comment #5.
- Status changed to Needs work
about 1 year ago 8:05am 21 October 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
+ /** + * Provides access to the Messenger service for displaying messages. + * + * @var Drupal\Core\Messenger\MessengerInterface + */ protected $messenger;
The messenger. is sufficient as description.
+ * @param \Drupal\Core\Messenger\MessengerInterface $messenger + * The messenger service.
It is not necessary to say it is a service.
+ /** + * Implements resend(). + */
That description is merely repeating the method name.
The parameter descriptions and the return value description are missing.+ * @param \Drupal\user\UserStorageInterface $user_storage + * A User storage.
User does not need to be capitalized. The descriptions start with a definite article.
Since there is a 9.x branch, that is probably the branch that should be changed. At least, that should be the first branch to be changed and, eventually, the changes back-ported to the other branch.
- Assigned to imustakim
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 3:31am 25 October 2023 - Status changed to Needs work
about 1 year ago 9:16am 25 October 2023 - Assigned to imustakim
- Issue was unassigned.
- Status changed to Needs review
about 1 year ago 5:24pm 25 October 2023 - First commit to issue fork.
-
glynster →
committed bf07a43d on 9.x authored by
imustakim →
Resolve #3394540 "Coding standards"
-
glynster →
committed bf07a43d on 9.x authored by
imustakim →
- Status changed to Fixed
6 months ago 4:11am 31 July 2024 - Status changed to Fixed
6 months ago 6:24pm 31 July 2024