From eb56ecd50f0a761626234b14ed2a0b51daca5d6a Mon Sep 17 00:00:00 2001 From: maks feltrin Date: Thu, 22 Sep 2016 16:46:56 +0200 Subject: [PATCH] add missing property Even if every class inherits from stdClass allowing us to add properties on runtime, i believe it's better to declare them. I also think that we should add service properties (those fetched from the registry/service-provider), smt like: ```php // User properties private $user_id; private $user_group_id; private $username; private $permission = array(); //services private $db; private $request; private $session; ``` or as i always do, with doc-blocks to allow type-hinting and code completion ```php // User properties /** * @var int */ private $user_id; /** * @var int */ private $user_group_id; /** * @var string */ private $username; /** * @var array */ private $permission = array(); //services /** * @var DB */ private $db; /** * @var Request */ private $request; /** * @var Session */ private $session; ``` --- upload/system/library/cart/user.php | 1 + 1 file changed, 1 insertion(+) diff --git a/upload/system/library/cart/user.php b/upload/system/library/cart/user.php index 769a64237f2..3c17df5ae86 100644 --- a/upload/system/library/cart/user.php +++ b/upload/system/library/cart/user.php @@ -2,6 +2,7 @@ namespace Cart; class User { private $user_id; + private $user_group_id; private $username; private $permission = array();