- Issue created by @omkar_yewale
- 🇮🇳India omkar_yewale Mumbai
The !2 MR was created and all errors/warnings are fixed except these two warnings.
FILE: /set_front_page/src/Form/SetFrontPageEntitySettings.php ----------------------------------------------------------------------------- 181 | WARNING | Unused variable $config. 198 | WARNING | Unused variable $config. -----------------------------------------------------------------------------
The maintainer can make this decision.
- Issue was unassigned.
- Status changed to RTBC
over 1 year ago 2:32am 2 May 2023 - 🇵🇭Philippines paraderojether
Hi omkar_yewale
I reviewed MR!2, and confirmed that the issues reported by phpcs are fixed except for the 2 warnings:
FILE: /Users/studenttrainees/New/drupalorgsite/docroot/modules/contrib/set_front_page/src/Form/SetFrontPageEntitySettings.php
-----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
-----------------------------------------------------------------------------------------------------------------------------
181 | WARNING | Unused variable $config.
198 | WARNING | Unused variable $config.
-----------------------------------------------------------------------------------------------------------------------------Time: 536ms; Memory: 10MB
I added screenshots for reference.
Thank You. - Status changed to Needs work
over 1 year ago 9:13am 2 May 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
+/** + * @file + * Install, update and uninstall functions for set_front_page module. + */
That comment must use the module name, not its machine name.
After for, there is a missing article.function set_front_page_uninstall() { - // Remove State + // Remove State. \Drupal::state()->delete('set_front_page.path');
Instead of editing that comment, it would be better to remove it, since it does not say anything that is already clear from the code.
+ * @param \Drupal\Core\State\State $state + * The object State.
State is misspelled, since it is not the first word of a sentence.
The object State. is not the correct description to give.if ($frontpage !== NULL) { - // frontpage can be empty + // Frontpage can be empty. $this->setFrontPage($frontpage); } if ($default !== NULL) { - // default can be empty + // Default can be empty. $config->set('site_frontpage_default', $default); }
Those comments do not make sense.
$frontpage
is notNULL
. What does$frontpage
can be empty. mean, since the code already verified that$frontpage
is not empty?
It is better to removed those comments, instead of editing them. - Assigned to himanshu_jhaloya
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 11:27am 2 May 2023 - Open on Drupal.org →Core: 9.5.5 + Environment: PHP 8.1 & MySQL 8last update
over 1 year ago Waiting for branch to pass - 🇮🇳India himanshu_jhaloya Indore
Created a patch to fix the commented issues. please review
- Status changed to Needs work
over 1 year ago 2:06pm 22 August 2023 - 🇺🇸United States DamienMcKenna NH, USA
I don't see why comments are being removed? I'll have to take a look.
- First commit to issue fork.
- Open on Drupal.org →Core: 9.5.5 + Environment: PHP 8.1 & MySQL 8last update
12 months ago Waiting for branch to pass - Status changed to Needs review
11 months ago 7:50am 31 January 2024 - 🇮🇳India zkhan.aamir
Hi
MR #9 applied successfully.
Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/contrib/set_front_page (8.x-1.x) $ curl https://git.drupalcode.org/project/set_front_page/-/merge_requests/2.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 17508 0 17508 0 0 43039 0 --:--:-- --:--:-- --:--:-- 43229 patching file README.txt patching file set_front_page.install patching file set_front_page.services.yml patching file src/Controller/SetFrontPageController.php patching file src/Form/SetFrontPageConfigForm.php patching file src/Form/SetFrontPageEntitySettings.php patching file src/SetFrontPageManager.php patching file tests/src/Functional/SetFrontPageTests.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 set_front_page/ Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/contrib $
No issues or error remaining.