- Issue created by @rassoni
- Assigned to akshaydalvi212
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 10:39am 17 March 2023 - š®š³India akshaydalvi212
Providing the patch to solve all the PHPCS issues.
Kindly review. - Status changed to Needs work
over 1 year ago 3:01pm 18 March 2023 - š®š¹Italy apaderno Brescia, š®š¹
+dependencies: + - drupal:token
The Token module is not a Drupal core module. It is also not necessary to declare it as dependency, since this module checks first the Token module is installed.
/** /** - * Returns a random number between min and max. + * Return a random number between min and max. * * @param {int} min * The minimal value.
The existing comment is already correct, given that is a comment for a function or a method. It is
@param {int} min
that needs to be fixed, as it needs to be fixed the other parameter definition.+/** + * Provide Size values for the Browser. + */
The verb must use the Simple Present and the third person singular. Size and Browser do not need to be capitalized. The class description can be better written.
* BrowserSize constructor. * * @param int $min_width + * Minimum width value. * @param int $max_width + * Maximum width value. * @param string $label + * Label for preview. * @param string $short_label + * Short label for preview.
The class name does not include its namespace. The descriptions are missing articles.
+ * Get Minimum width. + * * @return int + * Minimum width value.
This is also wrong for the reasons already said for the other lines.
/** + * The link size. + * * @var array */ protected $sizes;
Since that property contains an array, it cannot be described as link size. Also, what is, exactly, a link size in this case?
/** + * Return the lable of link. + * * @return string + * Link label.
lable is a typo.
/** + * Return the Open External Label. + * * @return string + * External Label.
Return is probably not the best verb to use for a method, or it should be used for almost all the methods and functions.
+/** + * Preview link editing using edit form. + */
That description does not make sense. It is more probable that is the class for the edit form used for the preview link.
* @return \Drupal\Core\Link + * URL link for previewing the entity.
It is not necessary to say URL link, as a link is necessarily a URL.
- First commit to issue fork.
- š®š³India TanujJain-TJ
updating the patch as it shows this error
error: patch failed: dpl.info.yml:4, error: dpl.info.yml: patch does not apply
while applying and also addressing some changes listed in #5, please review. - Assigned to shalini_jha
- š®š³India shalini_jha
Added the patch for fixes of most of listed issues. please review.
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 5:30pm 23 March 2023 - Status changed to Needs work
over 1 year ago 8:34am 24 March 2023 - š®š¹Italy apaderno Brescia, š®š¹
/** - * Returns a random number between min and max. - * - * @param {int} min + *@param {int} min * The minimal value. * @param {int} max * The maximum value.
The short description should not be removed.
How the parameters are described is correct, since that is for a JavaScript file. (I did not notice that, earlier, and I wrongly reported@param {int} min
should be fixed.)/** + * Minimum width value. + * * @var int */ protected $minWidth; /** + * Maximum width value. + * * @var int */ protected $maxWidth; /** + * Label for preview. + * * @var string */ protected $label; /** + * Short label for preview. + * * @var string */
Those descriptions are all missing an article or two.
* BrowserSize constructor. * * @param int $min_width + * Minimum width value. * @param int $max_width + * Maximum width value. * @param string $label + * Label for preview. * @param string $short_label + * Short label for preview.
The class name is missing its namespace.
/** + * Minimum width value. * @return int */ public function getMinWidth() {
The description is missing an article, and it could be better written.
There is a missing empty line before @return.
The return value is not described./** + * Get the Label for preview. + * * @return string + * Label. */
When Label is not the first word in a sentence, it is not written in capital case.
The verb used in a method description must use the Simple Present and the third person singular.
The return value description can be written better.* Controller for the preview page. * + * @param Drupal\node\NodeInterface $node + * The Node. + * @param Drupal\dpl\Entity\DecoupledPreviewLink $decoupled_preview_link + * The consumer preview links. * @param \Symfony\Component\HttpFoundation\Request $request + * The HTTP request.
Since that documentation comment is changed, also the short description should be changed: It misses an article.
Node, since it is not the first word in a sentence, must be spelled differently./** - * Returns a preview link for a given consumer. + * Return a preview link for a given consumer.
The verb was already correct. What needs to be change is the article used before preview link.
/** + * The link size. + * * @var array */ protected $sizes;
Since that is an array, it cannot be the link size. Either that variable does not contain an array, or it cannot be described in that way.
+ * Default size. + * * @var string */
An article is missing from the description.
* @return \Drupal\dpl\PreviewLinkInstance + * PreviewLink Instance.
That does not describe the return value; it is just the class name of the returned object spelled as two word.
Instance is not spelled correctly. (It is not the first word in a sentence.)+/** + * Preview link creating using add form. + */ class PreviewLinkAddForm extends PreviewLinkEditForm {
That description is not grammatically correct, since there are two present participles in row.
Even if that were correct, the description does not make sense.+ /** + * Constructs a new service object. + *
The description must include the class name and its namespace.
- '#markup' => $this->t('Enable the token module to see a list of available tokens.') + '#markup' => $this->t('Enable the token module to see a list of available tokens.'),
Since that line is changed, the module name should also be written in title case.
/** + * Get the Defination of the previewed instance. + * * @return \Drupal\dpl\PreviewLinkInstance + * URL link of the Instance.
There is the same typo already reported.
- First commit to issue fork.
- Status changed to Needs review
10 months ago 7:59am 31 January 2024 - š®š³India zkhan.aamir
Hi,
MR #14 applied successfully.
Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/contrib/dpl (8.x-2.x) $ curl https://git.drupalcode.org/project/dpl/-/merge_requests/2.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 18507 0 18507 0 0 48736 0 --:--:-- --:--:-- --:--:-- 48831 patching file README.md patching file config/schema/dpl.schema.yml patching file dpl.info.yml patching file dpl.libraries.yml patching file dpl.routing.yml patching file src/BrowserSize.php patching file src/Controller.php patching file src/DecoupledPreviewLinks.php patching file src/Entity/DecoupledPreviewLink.php patching file src/Entity/DecoupledPreviewLinkListBuilder.php patching file src/Form/PreviewLinkAddForm.php patching file src/Form/PreviewLinkDeleteForm.php patching file src/Form/PreviewLinkEditForm.php patching file src/Plugin/Deriver/PreviewLinkLocalTaskDeriver.php patching file src/Plugin/Menu/LocalTask/DecoupledPreviewLinkTask.php patching file src/PreviewLinkInstance.php patching file tests/src/Nightwatch/TestSetup.php Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/contrib $ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,js,yml dpl/ Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/contrib $
No remaining issues or errors.
- Status changed to Needs work
4 months ago 2:35am 17 July 2024 Hi @Yashawi18,
Your changes on MR !2 was applied not-so successfully, might be the reason errors are still reported. Please see below:
dpl git:(master) ā curl https://git.drupalcode.org/project/dpl/-/merge_requests/2.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 18507 0 18507 0 0 58660 0 --:--:-- --:--:-- --:--:-- 61281 patching file README.md patching file config/schema/dpl.schema.yml patching file dpl.info.yml Hunk #1 FAILED at 4. 1 out of 1 hunk FAILED -- saving rejects to file dpl.info.yml.rej patching file dpl.libraries.yml patching file dpl.routing.yml patching file src/BrowserSize.php patching file src/Controller.php patching file src/DecoupledPreviewLinks.php patching file src/Entity/DecoupledPreviewLink.php patching file src/Entity/DecoupledPreviewLinkListBuilder.php patching file src/Form/PreviewLinkAddForm.php patching file src/Form/PreviewLinkDeleteForm.php patching file src/Form/PreviewLinkEditForm.php patching file src/Plugin/Deriver/PreviewLinkLocalTaskDeriver.php patching file src/Plugin/Menu/LocalTask/DecoupledPreviewLinkTask.php patching file src/PreviewLinkInstance.php patching file tests/src/Nightwatch/TestSetup.php ā dpl git:(master) ā cd .. ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig dpl FILE: /Users/PrometInterns/Demo-site/drupal-orgissue-v9/web/modules/contrib/dpl/src/Plugin/Menu/LocalTask/DecoupledPreviewLinkTask.php -------------------------------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES -------------------------------------------------------------------------------------------------------------------------------------- 40 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 54 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter -------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/PrometInterns/Demo-site/drupal-orgissue-v9/web/modules/contrib/dpl/src/DecoupledPreviewLinks.php ------------------------------------------------------------------------------------------------------------- FOUND 2 ERRORS AFFECTING 2 LINES ------------------------------------------------------------------------------------------------------------- 51 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter 99 | ERROR | [x] Multi-line function declarations must have a trailing comma after the last parameter ------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------- Time: 391ms; Memory: 10MB
Kindly check
Thanks,
Jake