- Issue created by @samit.310@gmail.com
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 3:55am 10 March 2023 - 🇮🇳India samit.310@gmail.com
Above error/warnings has been fixed.
- Status changed to RTBC
almost 2 years ago 5:20am 10 March 2023 - 🇮🇳India hardikpandya
The patch fixes all phpcs issues. Marking RTBC!
- @hardikpandya opened merge request.
- Status changed to Needs work
almost 2 years ago 2:17pm 10 March 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
- $message = $this->t('You have Rejected the invitation.');
+ // $message = $this->t('You have Rejected the invitation.');Why is that line commented out? That is not change required to fix the issues reported by
phpcs
.+ /** + * The entity type manager. + * + * @var \Drupal\Core\Entity\EntityTypeManagerInterface + */ + protected $entityTypeManager; + + /** + * The route match service. + * + * @var \Drupal\Core\Routing\RouteMatchInterface + */ + protected $routeMatch; + + /** + * The current user. + * + * @var \Drupal\Core\Session\AccountProxyInterface + */ + protected $currentUser; + + /** + * The email validator. + * + * @var \Drupal\Component\Utility\EmailValidatorInterface + */ + protected $emailValidator; +
Some of those properties are already defined from the parent class.
+ /** + * PrivateMessageIniviteForm form construct. + *
The documentation comment for a class is different and it should include the class namespace.
- Assigned to Soham Sengupta
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 7:26am 11 March 2023 - 🇮🇳India Soham Sengupta
I checked that, $message is an unused variable as it was not being used anywhere in the function, hence, the line is commented.
Fixed the mentioned issues -
- corrected the misspelled class name
- added the namespace to class documentation comment
- reused the parent properties - Status changed to Needs work
almost 2 years ago 9:30am 11 March 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
- $messenger = \Drupal::messenger(); + $messenger = $this->messenger;
Since there is a property for the messenger, the code needs to be changed to use that property.
- $config = \Drupal::service('config.factory')->getEditable('private_message_invite.settings'); + $config = $this->configFactory->getEditable('private_message_invite.settings');
A class that extends
ConfigFormBase
uses theconfig()
method, not that code. That is the same error done by the current code, but since that line is changed, it needs to be changed correctly.+ * + * @package Drupal\private_message_invite\Form
@package
is not used for classes, in Drupal.+ /** + * Constructs PrivateMessageInviteForm.
The comment is still not using the class namespace. Then, it is not a class to be constructed, but an instance of that class (or object).
- $values = $form_state->getValues(); + // $values = $form_state->getValues();
If a variable is only initialized, but not used, the lines initializing (or changing the value of) that variable should be removed, not commented out.
- Assigned to imustakim
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 2:06pm 13 March 2023 - Status changed to Needs work
almost 2 years ago 4:56pm 13 March 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
+ /** + * Constructs PrivateMessageInviteForm object. + *
The namespace is still not used, and there is an article missing in that phrase. (Then, the usual comment says it is a new object.)
- Status changed to Needs review
almost 2 years ago 5:52am 14 March 2023 - 🇨🇦Canada imustakim Canada
Please ignore the last patch and interdiff.
Here is the updated paatch. - Status changed to Needs work
almost 2 years ago 8:43am 14 March 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
+ if ($form_state->hasValue(['custom', 'modules']) && is_array( + $form_state->getValue(['custom', 'modules']))) {
- foreach ([MailsystemManager::MAILSYSTEM_TYPE_FORMATTING, MailsystemManager::MAILSYSTEM_TYPE_SENDING] as $type) { + foreach ([MailsystemManager::MAILSYSTEM_TYPE_FORMATTING, MailsystemManager::MAILSYSTEM_TYPE_SENDING, + ] as $type) {
It is still better to leave the control statement on a single line.
- Status changed to Needs review
almost 2 years ago 8:48am 14 March 2023 - Status changed to Needs work
almost 2 years ago 10:45am 14 March 2023 - 🇮🇳India Meeni_Dhobale
Hi @apaderno I test and review this patch #13, and it is applied very cleanly. But there has still one error remained. In PrivateMessageIniviteForm.php file. Adding error message below.:
FILE: ...Source/drupal-10-1/modules/contrib/private_message_invite/src/Form/PrivateMessageIniviteForm.php
------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------------
36 | WARNING | Line exceeds 80 characters; contains 86 characters
------------------------------------------------------------------------------------------------------ - Status changed to Needs review
almost 2 years ago 6:34pm 14 March 2023 - 🇮🇳India Akram Khan Cuttack, Odisha
added updated patch now it's remove remaining issues
- Status changed to Fixed
about 1 year ago 12:08pm 22 November 2023 - Status changed to Fixed
about 1 year ago 12:10pm 22 November 2023