- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command has been used, which arguments have been used, and which report that command shown.
- Status changed to Needs review
about 1 year ago 6:25am 12 May 2023 - ๐ฎ๐ณIndia Ashutosh Ahirwal India
Providing updated patch with phpcs issue fixes.
please review. - Status changed to Needs work
about 1 year ago 12:54pm 12 May 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, show which command has been used, which arguments have been used, and which report that command shown.
The issue summary must still be updated.
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
Also, the report shows warnings/errors for 13 files; the last patch changes 17 files. Either the report in the issue summary is not complete or the patch changes more files than necessary.
- Status changed to Needs review
12 months ago 7:57am 29 June 2023 - Status changed to Needs work
12 months ago 8:33am 29 June 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
The warnings/errors should be fixed in the 2.0.x branch.
- ๐ฎ๐ณIndia kbk1992 Hyderabad
bharath-kondeti โ made their first commit to this issueโs fork.
- Assigned to kbk1992
- ๐ฎ๐ณIndia kbk1992 Hyderabad
There are only issues in 8 files against 2.0.x as mentioned below:
FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\modules\single_page_site_next_page\src\EventSubscriber\AlterSinglePageSiteOutput.php
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
16 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\single_page_site.install
----------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
----------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\single_page_site.module
---------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
---------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------------------FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\src\Controller\SinglePageSiteController.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 3 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
20 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
96 | WARNING | [ ] Unused variable $menu.
178 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\src\Event\EventSinglePageSiteAlterOutput.php
------------------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
11 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
------------------------------------------------------------------------------------------------------------------------------------FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\src\Event\SinglePageSiteEvents.php
--------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
--------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
9 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
--------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--------------------------------------------------------------------------------------------------------------------------FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\src\Form\SinglePageSiteConfigForm.php
----------------------------------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 31 WARNINGS AFFECTING 34 LINES
----------------------------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
15 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
71 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
76 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
81 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
85 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
89 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
98 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
107 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
111 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
115 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
119 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
122 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
123 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
126 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
128 | ERROR | [x] Use null coalesce operator instead of ternary operator.
133 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
138 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
142 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
146 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
150 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
155 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
161 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
162 | ERROR | [x] Use null coalesce operator instead of ternary operator.
167 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
172 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
175 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
179 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
182 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
198 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
205 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
211 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
241 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
251 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------------------------------------------------------------------------------FILE: C:\Practice\xampp\htdocs\locald9site\web\modules\contrib\single_page_site-3150482\src\Manager\SinglePageSiteManager.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AND 1 WARNING AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------
1 | ERROR | [x] End of line character is invalid; expected "\n" but found "\r\n"
27 | WARNING | [ ] The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-----------------------------------------------------------------------------------------------------------------------------Time: 644ms; Memory: 4MB
- Issue was unassigned.
- Status changed to Needs review
12 months ago 4:40pm 2 July 2023 - ๐ฎ๐ณIndia kbk1992 Hyderabad
Updated the patch with changes. Please review
- ๐ฎ๐ณIndia Anjali Mehta
Hello @bharath-kondeti
Tested patch on Drupal 9.5.9 and php version 8.1. Patch applied cleanly. But getting error on running the phpcs. Adding screenshot for Your references. Please have a look.
Thank You for your support. - Status changed to Needs work
12 months ago 2:40pm 3 July 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
- * Class AlterSinglePageSiteOutput. + * Class to providing functionality for AlterSinglePageSiteOutput.
No, a class does not provide functionality for itself. That does not explain which functionality it provides, though.
+ /** + * The Entity Query Factory service. + * + * @var \Drupal\Core\Entity\Query\QueryFactoryInterface + */ + protected $entityQueryFactory;
The entity query service. is sufficient.
* Config factory to load/save config. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * Core module handler. + * @param \Drupal\Core\Entity\Query\QueryFactoryInterface $entityQueryFactory + * The Entity Query Factory. */
Since that documentation comment is changed, Core module handler. should be replaced with The module handler.
- Status changed to Needs review
12 months ago 7:28am 11 July 2023 - ๐ฎ๐ณIndia Anjali Mehta
Updated the patch with changes.
Please review.
Thank You. - ๐ฎ๐ณIndia Anjali Mehta
Updated the patch with changes.
Please review.
Thank You. - Status changed to RTBC
11 months ago 2:18pm 21 July 2023 - ๐ต๐ญPhilippines roberttabigue
Hi,
I reviewed the changes and confirmed the Patch was applied cleanly to the Single Page Site module against 2.0.x-dev on Drupal 9.5.10.
Checking patch modules/single_page_site_next_page/src/EventSubscriber/AlterSinglePageSiteOutput.php... Checking patch single_page_site.module... Checking patch src/Controller/SinglePageSiteController.php... Checking patch src/Event/EventSinglePageSiteAlterOutput.php... Checking patch src/Event/SinglePageSiteEvents.php... Checking patch src/Form/SinglePageSiteConfigForm.php... Checking patch src/Manager/SinglePageSiteManager.php... Applied patch modules/single_page_site_next_page/src/EventSubscriber/AlterSinglePageSiteOutput.php cleanly. Applied patch single_page_site.module cleanly. Applied patch src/Controller/SinglePageSiteController.php cleanly. Applied patch src/Event/EventSinglePageSiteAlterOutput.php cleanly. Applied patch src/Event/SinglePageSiteEvents.php cleanly. Applied patch src/Form/SinglePageSiteConfigForm.php cleanly. Applied patch src/Manager/SinglePageSiteManager.php cleanly.
And all PHPCS errors have been fixed.
I ran this command:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml single_page_site/
Please see the attached files for reference.
I'm moving this now to RTBC.
Thank you!
- Status changed to Needs work
11 months ago 5:57pm 21 July 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
The patch could apply, but the changes are not correct.
/** - * Class SinglePageSiteController. + * Class to providing functionality for SinglePageSiteController. * * @package Drupal\single_page_site\Controller */ @@ -93,7 +93,7 @@ class SinglePageSiteController extends ControllerBase {
The description is still saying the class provides functionality for itself, which is not correct, and it does not explain which functionality the class provides.
- if ($menu = $this->manager->getMenu()) { + if ($this->manager->getMenu()) {
Given the method name, that change does not seem correct. If the
$menu
variable is not used fromrender()
, there is a bug that needs to be fixed./** - * Class EventSinglePageSiteAlterOutput. + * Class to providing functionality for EventSinglePageSiteAlterOutput. * * @package Drupal\single_page_site\Event */
/** - * Class SinglePageSiteEvents. + * Class to providing functionality for SinglePageSiteEvents. * * @package Drupal\single_page_site\Event */
/** - * Class SinglePageSiteConfigForm. + * Class to providing functionality for SinglePageSiteConfigForm. * * @package Drupal\single_page_site\Form */
What I reported for a previous change holds true in these cases too.
+ /** + * The entity query service. + * + * @var \Drupal\Core\Entity\Query\QueryFactoryInterface + */ + protected $entityQueryFactory;
The entity query factory. is better, since the entity query service is a different thing.
+ * @param \Drupal\Core\Entity\Query\QueryFactoryInterface $entityQueryFactory + * The Entity Query Factory.
Only the first word must be capitalized.
- Merge request !4Issue #3150482: Fix the issues reported by phpcs โ (Open) created by Unnamed author
- Status changed to Needs review
4 months ago 8:03am 13 February 2024 - First commit to issue fork.
- ๐ฎ๐ณIndia Preethy_ray
pray_12 โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia Shank115
I ran this command
phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml single_page_site/
and found no issues or warnings. - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
apaderno โ changed the visibility of the branch 3150482-fix-the-issues to hidden.