From a8c5661cb70f5f3314274e94f5f16f977336e5fe Mon Sep 17 00:00:00 2001 From: Gustavo Novaro Date: Wed, 8 Feb 2017 17:36:04 -0300 Subject: [PATCH 1/2] Code style Set public and private --- htdocs/cashdesk/class/Auth.class.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/cashdesk/class/Auth.class.php b/htdocs/cashdesk/class/Auth.class.php index 33bbd094050..0de4254cf29 100644 --- a/htdocs/cashdesk/class/Auth.class.php +++ b/htdocs/cashdesk/class/Auth.class.php @@ -22,14 +22,14 @@ */ class Auth { - var $db; + private $db; - var $login; - var $passwd; + private $login; + private $passwd; - var $reponse; + private $reponse; - var $sqlQuery; + public $sqlQuery; /** * Enter description here ... @@ -37,7 +37,7 @@ class Auth * @param DoliDB $db Database handler * @return void */ - function __construct($db) + public function __construct($db) { $this->db = $db; $this->reponse(null); @@ -49,7 +49,7 @@ class Auth * @param string $aLogin Login * @return void */ - function login($aLogin) + public function login($aLogin) { $this->login = $aLogin; } @@ -71,7 +71,7 @@ class Auth * @param string $aReponse Response * @return void */ - function reponse($aReponse) + public function reponse($aReponse) { $this->reponse = $aReponse; } @@ -83,7 +83,7 @@ class Auth * @param string $aPasswd Password * @return int 0 or 1 */ - function verif($aLogin, $aPasswd) + public function verif($aLogin, $aPasswd) { global $conf,$langs; global $dolibarr_main_authentication,$dolibarr_auto_user; From f8a6d60fe53b2966ed4707a2c741931fdde79095 Mon Sep 17 00:00:00 2001 From: Gustavo Novaro Date: Wed, 8 Feb 2017 20:24:20 -0300 Subject: [PATCH 2/2] $db attibute now be protected. --- htdocs/cashdesk/class/Auth.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/cashdesk/class/Auth.class.php b/htdocs/cashdesk/class/Auth.class.php index 0de4254cf29..5e431514d1c 100644 --- a/htdocs/cashdesk/class/Auth.class.php +++ b/htdocs/cashdesk/class/Auth.class.php @@ -22,7 +22,7 @@ */ class Auth { - private $db; + protected $db; private $login; private $passwd;