From 3b2db158d562cacf9a11a9de096bf4adc2d14883 Mon Sep 17 00:00:00 2001 From: Michael Gauthier Date: Wed, 19 Nov 2025 15:58:36 -0400 Subject: [PATCH 1/3] Add property declarations for defined app modules --- Store/StoreApplication.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Store/StoreApplication.php b/Store/StoreApplication.php index f8294d9a..878e3ec5 100644 --- a/Store/StoreApplication.php +++ b/Store/StoreApplication.php @@ -5,6 +5,18 @@ * * @copyright 2005-2016 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * + * @property SiteDatabaseModule $database + * @property SiteAccountSessionModule $session + * @property SiteCookieModule $cookie + * @property StoreCartModule $cart + * @property StoreCheckoutModule $checkout + * @property SiteMessagesModule $messages + * @property SiteConfigModule $config + * @property SiteAdModule $ads + * @property SiteAnalyticsModule $analytics + * @property SiteTimerModule $timer + * @property SiteCryptModule $crypt */ abstract class StoreApplication extends SiteWebApplication { From c71dffb11b1c4a5d661755ee25c9e369021a37e5 Mon Sep 17 00:00:00 2001 From: Michael Gauthier Date: Wed, 19 Nov 2025 16:07:24 -0400 Subject: [PATCH 2/3] Add more application module property annotations --- Store/StoreAdReferrerAggregator.php | 5 ++++- Store/StoreCacheTableUpdater.php | 5 +++++ Store/StoreCartCleaner.php | 6 ++++++ Store/StoreOrderCommentDigestMailer.php | 5 ++++- Store/StorePrivateDataDeleterApplication.php | 2 ++ Store/StoreProductAttributeBindingQueueUpdater.php | 3 +++ Store/StoreProductFileFtpUploader.php | 5 +++++ 7 files changed, 29 insertions(+), 2 deletions(-) diff --git a/Store/StoreAdReferrerAggregator.php b/Store/StoreAdReferrerAggregator.php index 381dfe50..1234c0f4 100644 --- a/Store/StoreAdReferrerAggregator.php +++ b/Store/StoreAdReferrerAggregator.php @@ -5,13 +5,16 @@ * * @copyright 2009-2016 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * + * @property StoreCommandLineConfigModule $config + * @property SiteDatabaseModule $database */ class StoreAdReferrerAggregator extends SiteCommandLineApplication { /** * A convenience reference to the database object. * - * @var MDB2_Driver + * @var MDB2_Driver_Common */ public $db; diff --git a/Store/StoreCacheTableUpdater.php b/Store/StoreCacheTableUpdater.php index 87dac402..c0ffff5c 100644 --- a/Store/StoreCacheTableUpdater.php +++ b/Store/StoreCacheTableUpdater.php @@ -8,9 +8,14 @@ * * @copyright 2006-2016 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * + * @property StoreCommandLineConfigModule $config + * @property SiteDatabaseModule $database */ class StoreCacheTableUpdater extends SiteCommandLineApplication { + public MDB2_Driver_Common $db; + public function run() { $this->initModules(); diff --git a/Store/StoreCartCleaner.php b/Store/StoreCartCleaner.php index e66d6b0a..c3e723df 100644 --- a/Store/StoreCartCleaner.php +++ b/Store/StoreCartCleaner.php @@ -12,9 +12,15 @@ * * @copyright 2005-2016 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * + * @property StoreCommandLineConfigModule $config + * @property SiteDatabaseModule $database + * @property SiteSessionModule $session */ class StoreCartCleaner extends SiteCommandLineApplication { + public MDB2_Driver_Common $db; + public function init() { $this->initModules(); diff --git a/Store/StoreOrderCommentDigestMailer.php b/Store/StoreOrderCommentDigestMailer.php index 7512c2e3..3947d0a6 100644 --- a/Store/StoreOrderCommentDigestMailer.php +++ b/Store/StoreOrderCommentDigestMailer.php @@ -4,13 +4,16 @@ * Sends out a digest email of new order comments. * * @copyright 2012-2016 silverorange + * + * @property StoreCommandLineConfigModule $config + * @property SiteDatabaseModule $database */ class StoreOrderCommentDigestMailer extends SiteCommandLineApplication { /** * A convenience reference to the database object. * - * @var MDB2_Driver + * @var MDB2_Driver_Common */ public $db; diff --git a/Store/StorePrivateDataDeleterApplication.php b/Store/StorePrivateDataDeleterApplication.php index 1a3ee239..5c7c40ef 100644 --- a/Store/StorePrivateDataDeleterApplication.php +++ b/Store/StorePrivateDataDeleterApplication.php @@ -5,6 +5,8 @@ * * @copyright 2006-2016 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * + * @property StoreCommandLineConfigModule $config */ class StorePrivateDataDeleterApplication extends SitePrivateDataDeleterApplication { diff --git a/Store/StoreProductAttributeBindingQueueUpdater.php b/Store/StoreProductAttributeBindingQueueUpdater.php index 1d49c8e6..10493421 100644 --- a/Store/StoreProductAttributeBindingQueueUpdater.php +++ b/Store/StoreProductAttributeBindingQueueUpdater.php @@ -8,6 +8,9 @@ * * @copyright 2010-2016 silverorange * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 + * + * @property StoreCommandLineConfigModule $config + * @property SiteDatabaseModule $database */ class StoreProductAttributeBindingQueueUpdater extends SiteCommandLineApplication { diff --git a/Store/StoreProductFileFtpUploader.php b/Store/StoreProductFileFtpUploader.php index 4fa4cacb..11b484a8 100644 --- a/Store/StoreProductFileFtpUploader.php +++ b/Store/StoreProductFileFtpUploader.php @@ -7,9 +7,14 @@ * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 * * @todo Figure out when setPath() is used, it may be a dead code path. + * + * @property StoreCommandLineConfigModule $config + * @property SiteDatabaseModule $database */ abstract class StoreProductFileFtpUploader extends SiteCommandLineApplication { + public MDB2_Driver_Common $db; + private $path = ''; private $upload = true; private $display = false; From 3c75cdc71e06210a03782cb1de9a8e19d26c61a4 Mon Sep 17 00:00:00 2001 From: Michael Gauthier Date: Wed, 19 Nov 2025 16:10:44 -0400 Subject: [PATCH 3/3] Fix coding standards --- Store/admin/components/Product/Details.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Store/admin/components/Product/Details.php b/Store/admin/components/Product/Details.php index b56b0823..a700c667 100644 --- a/Store/admin/components/Product/Details.php +++ b/Store/admin/components/Product/Details.php @@ -1131,8 +1131,8 @@ private function buildItemGroups() $first_group = $groups->getFirst(); if ( - $first_group === null || - (count($groups) === 1 && $first_group->item_group === 0) + $first_group === null + || (count($groups) === 1 && $first_group->item_group === 0) ) { $num_groups = 0; } elseif ($first_group->item_group === 0) {