- Status changed to Needs work
over 1 year ago 9:25am 4 March 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
- // @TODO, we should not automatically verify the email. See + // @todo , we should not automatically verify the email. See
What follows
@todo
is a sentence, which starts with a word written in capital case and ends with a period.- public function verifyUserAttribute($attributeName, $confirmationCode, $accessToken); + public function verifyUserAttribute($confirmationCode, $attributeName, $accessToken);
Has been verified that swapping parameters do not cause issues?
/** - * Class CognitoToken. + * Class for CognitoToken. */
Adding for does not make the documentation comment correct, since it should describe the class purpose, not say the class name.
- * (optional) Either AccessToken or IdToken + * (optional) Either AccessToken or IdToken.
Since the documentation comment is changed, it should also be made more comprehensible.
+ /** + * Constructs a new CognitoCommands object. + *
The class name must be fully name-spaced.
- public function report($cognitoUserFile) { + public function report(array $cognitoUserFile) { if ($cognitoUserFile[0] !== '/') { $cognitoUserFile = getcwd() . '/' . $cognitoUserFile; }
$cognitoUserFile
is a string, not an array.- * @param $plugin_id + * @param array $plugin_id * Plugin ID.
$plugin_id is not type-hinted as array. See
ResourceBase::__construct()
. - Status changed to Needs review
over 1 year ago 6:34am 17 March 2023 - Status changed to Needs work
over 1 year ago 8:42am 17 March 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
- // @TODO, we should not automatically verify the email. See + // @todo change automatically verify the email. // https://drupal.org/node/2907479 for the fix here.
Still, there is no sentence. Also, in the existing text, the second sentence starts with a verb.
/** - * Class CognitoToken. + * The Cognito Token class describe for cognito token. */
The new description does not make sense.
* @param string $tokenType
- * (optional) Either AccessToken or IdToken
+ * (optional) Either AccessToken or IdToken.I know that is the description already used, but that describes the values that parameters can assume, not what that parameter is. Since that description is changed, it should be changed to show what it should show,
Also, since that is a string, its values are'AccessToken'
and'IdToken'
./** + * Retrieves Token. + * * @param string $tokenType * Must be either AccessToken or IdToken.
Token does not need to be in capital case. The parameter description is wrong for the same reason given for the previous change.
+ /** + * Constructs a CognitoCommands object. + *
The namespace is missing. Also, the usual comment speaks of new object.
+ /** + * The User Login Form constructor.
That comment does not show neither the class name (which does not contain spaces) nor its namespace.
Also, comments that describe a method start with a verb (Simple Present tense, third person singular).- * @param $plugin_id + * @param string $plugin_id * Plugin ID. - * @param $plugin_definition + * @param array $plugin_definition * Plugin definition. * @param array $serializer_formats * Serializer Formats.
The parameter descriptions all miss an article.
- public function __construct(array $configuration, $plugin_id, $plugin_definition, array $serializer_formats, LoggerInterface $logger, CognitoTokenInterface $cognitoToken) { + public function __construct(array $configuration, string $plugin_id, array $plugin_definition, array $serializer_formats, LoggerInterface $logger, CognitoTokenInterface $cognitoToken) { parent::__construct($configuration, $plugin_id, $plugin_definition, $serializer_formats, $logger); $this->cognitoToken = $cognitoToken;
$plugin_id
is not type-hinted to string. - Status changed to Needs review
over 1 year ago 1:12pm 30 March 2023 - ๐ฎ๐ณIndia TanujJain-TJ
As patch #15 doesn't apply and throws error,
error: patch failed: src/CognitoToken.php:184 error: src/CognitoToken.php: patch does not apply error: patch failed: src/Form/Email/UserLoginForm.php:192 error: src/Form/Email/UserLoginForm.php: patch does not apply error: patch failed: src/Plugin/rest/resource/CognitoUserRegistrationResource.php:200 error: src/Plugin/rest/resource/CognitoUserRegistrationResource.php: patch does not apply error: patch failed: tests/src/Kernel/Email/LoginFormTest.php:20 error: tests/src/Kernel/Email/LoginFormTest.php: patch does not apply
adding a new patch to remove phpcs errors and addressing points from #12, #14, #17, please review.
Hi , The patch provided in #18 failed to apply. Attaching the error ss for reference.
- Status changed to Needs work
10 months ago 11:40am 9 February 2024 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
SInce an issue fork has been created, let us continue using that.
- First commit to issue fork.
- Status changed to Needs review
10 months ago 12:03pm 9 February 2024 - First commit to issue fork.
- ๐ฎ๐ณIndia pray_12
Hi,
Applied the MR !7 found one warning.FILE: .../cognito/src/Plugin/rest/resource/CognitoAuthToken.php ---------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------- 32 | WARNING | Line exceeds 80 characters; contains 82 characters ----------------------------------------------------------------------------
- ๐ฎ๐ณIndia dev16.addweb
silvi.addweb โ made their first commit to this issueโs fork.