- Issue created by @TanujJain-TJ
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 4:33pm 22 February 2023 - 🇮🇳India TanujJain-TJ
Fixed above mentioned phpcs errors in this patch, ignoring .yml file phpcs issues for following errors.
FILE: /advpoll/advpoll.info.yml -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE -------------------------------------------------------------------------------- 1 | WARNING | Remove "project" from the info file, it will be added by | | drupal.org packaging automatically 1 | WARNING | Remove "datestamp" from the info file, it will be added by | | drupal.org packaging automatically 1 | WARNING | Remove "version" from the info file, it will be added by | | drupal.org packaging automatically -------------------------------------------------------------------------------
Please review.
- 🇮🇳India sahil.goyal
@TanujJain-TJ Thanx for the updated patch, but still there are unused variables. so updating the patch with interdiff.
- Status changed to Needs work
almost 2 years ago 2:14pm 27 February 2023 - 🇮🇳India saket-001
applying patch #2 still the issue is there so i changing status to need work.
- First commit to issue fork.
- Assigned to vishaljd
- @vishaljd opened merge request.
- Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 10:34am 28 February 2023 - 🇮🇳India nayana_mvr
Verified MR!9 on Drupal version 9.5.x and Advanced Poll version 8.x - 1.x. Patch applied cleanly but errors in advpoll.install and advpoll.module are not there in the MR. So its showing the follwing errors even after applying the patch:
FILE: ../contrib/advpoll/advpoll.install -------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 7 ERRORS AND 4 WARNINGS AFFECTING 7 LINES -------------------------------------------------------------------------------------------------------------------------------------------------------------- 1 | ERROR | [x] Missing file doc comment 7 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() | | for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block | | templates." 7 | ERROR | [x] Doc comment short description must start with a capital letter 7 | ERROR | [x] Doc comment short description must end with a full stop 10 | ERROR | [x] Inline comments must start with a capital letter 42 | WARNING | [ ] Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() | | for xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block | | templates." 42 | ERROR | [x] Doc comment short description must start with a capital letter 42 | ERROR | [x] Doc comment short description must end with a full stop 45 | ERROR | [x] Inline comments must start with a capital letter 71 | WARNING | [ ] Unused variable $entity. 84 | WARNING | [ ] Unused variable $entity. -------------------------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------------------------------------------------- FILE: ../contrib/advpoll/advpoll.module ------------------------------------------------------------------------------------------------------------------------------ FOUND 5 ERRORS AND 11 WARNINGS AFFECTING 13 LINES ------------------------------------------------------------------------------------------------------------------------------ 1 | ERROR | [x] Missing file doc comment 11 | WARNING | [ ] Line exceeds 80 characters; contains 111 characters 12 | WARNING | [ ] Line exceeds 80 characters; contains 113 characters 12 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses 29 | WARNING | [x] A comma should follow the last multiline array item. Found: 'content' 36 | WARNING | [x] A comma should follow the last multiline array item. Found: TRUE 38 | WARNING | [x] A comma should follow the last multiline array item. Found: 'content' 45 | WARNING | [x] A comma should follow the last multiline array item. Found: TRUE 47 | WARNING | [x] A comma should follow the last multiline array item. Found: 'content' 53 | WARNING | [x] A comma should follow the last multiline array item. Found: 'content' 59 | WARNING | [x] A comma should follow the last multiline array item. Found: 'content' 68 | WARNING | [ ] Line exceeds 80 characters; contains 101 characters 68 | ERROR | [x] Inline comments must start with a capital letter 68 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses 70 | ERROR | [x] Short array syntax must be used to define arrays 92 | WARNING | [ ] Unused variable $poll. ------------------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 12 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------ Time: 268ms; Memory: 12MB
- Merge request !10Issue #3343769: Fix the issues reported by phpcs → (Open) created by Unnamed author
- 🇮🇳India nayana_mvr
Created a new MR!10 fixing all the errors mentioned in the ticket.
@vishaljd I can see that in the MR!9, there are some changes inadvpoll.services.yml
but I couldn't find any error in that file before applying the patch so I have excluded that change in the new MR.Please review. Thanks.
- Status changed to RTBC
over 1 year ago 12:14am 5 May 2023 - 🇵🇭Philippines paraderojether
Hi nayana_mvr,
I reviewed MR!10 and confirmed it fixes all the errors and warnings reported by phpcs. Drupal core version 9.58, Advanced Poll 8.x-1.x-dev.
I added screenshots for reference.
Thank You. - Status changed to Needs work
over 1 year ago 5:01pm 5 May 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
+ /** + * The class Resolver. + *
Only the first word in the description must be capitalized.
+ /** + * The request stack services. + * + * @var \Symfony\Component\HttpFoundation\RequestStack + */ + protected $requestStack;
It would be The request stack service. but The request stack. is sufficient.
/** * Constructs a new PollPostRenderCache object. *
Since that class is inside the AdvPollPostRenderCache.php file, the class cannot be
PollPostRenderCache
.
The constructor description is also missing the class namespace./** - * @inheritDoc + * Trusted Call backs. */ public static function trustedCallbacks() {
Method inherited from a parent class or defined by an interface are simply documented with
{@inheritdoc}
.* @return int + * A integer containing a number of max choice.
It is not necessary to add the return type in the description, since that is already made clear from the previous line.
* @return array + * A array containing a form option value.
* @return int
+ * A integer containing a time stamps of poll.It is An array and An integer, but it is not necessary to repeat the return value type.
- Assigned to imustakim
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 7:34am 10 May 2023 - Status changed to Needs work
over 1 year ago 10:53am 10 May 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
--- a/advpoll.install +++ b/advpoll.install @@ -1,13 +1,18 @@ <?php +/** + * @file + * Contains install and update functions for Advanced Poll. + */ +
The correct description is Install, update, and uninstall hooks for the Advanced Poll module.
--- a/advpoll.module +++ b/advpoll.module @@ -1,5 +1,10 @@ <?php +/** + * @file + * This module extends Drupal Poll to provide additional poll types. + */ +
The correct description is Hook implementations for the Advanced Poll module.
function advpoll_form_poll_edit_form_alter(&$form, FormStateInterface $form_state) { /** @var \Drupal\poll\Entity\Poll $poll */ - $poll = $form_state->getFormObject()->getEntity(); - + // $poll = $form_state->getFormObject()->getEntity();
If a code line is not necessary, it is removed, not commented out.
- * Class ApprovalPollViewForm + * Defines a class Approval Poll View Form. * * @package Drupal\advpoll\Form */
Only the first word in the description must be capitalized.
Also, for a class, Defines a class is not correct.* @param \Drupal\Core\Form\FormStateInterface $form_state + * The form state interface.
It is simply The form state.
- * @param \Drupal\Core\Form\FormStateInterface $form_state + * @param \Drupal\Core\Form\FormStateInterface $form_state + * The form state interfece.
There is a typo in interfece, but The form state. is sufficient.
* @return int + * The timestamps of poll. */ protected function getStartTimestamp() {
It is The poll timestamp.
- Assigned to imustakim
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 11:54am 10 May 2023 I reviewed patch #20 , applied cleanly. it fixes all the errors and warnings reported by phpcs and addresses the comments in #18 .
- Status changed to Needs work
11 months ago 9:55am 5 February 2024 - 🇮🇹Italy apaderno Brescia, 🇮🇹
Since it has been already created, let's continue with MR !10, which still needs work.
The issue summary must be updated: I get more warnings/errors when I run PHP_CodeSniffer.
- First commit to issue fork.
- Status changed to Needs review
10 months ago 7:25am 14 February 2024 - 🇮🇳India pray_12
Hi,
Reviewed the MR!10[#24] found no Phpcs errors and warnings.
Thank you!!