From c02fbcf293bcdcfc7a8ca68b65fcc26d12499749 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 3 May 2014 02:57:46 +0200 Subject: [PATCH] Clean code. --- .../canvas/actions_adherentcard_common.class.php | 4 +++- .../contact/canvas/actions_contactcard_common.class.php | 4 +++- htdocs/societe/canvas/actions_card_common.class.php | 9 +++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index c88257b8de3..3d90fd3b79a 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -46,7 +46,8 @@ abstract class ActionsAdherentCardCommon /** * Instantiation of DAO class * - * @return void + * @return int 0 + * @deprecated Using getInstanceDao should not be used. */ private function getInstanceDao() { @@ -65,6 +66,7 @@ abstract class ActionsAdherentCardCommon } } } + return 0; } /** diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index b95f9113180..c0b59744630 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -46,7 +46,8 @@ abstract class ActionsContactCardCommon /** * Instantiation of DAO class * - * @return void + * @return int 0 + * @deprecated Using getInstanceDao should not be used. */ private function getInstanceDao() { @@ -65,6 +66,7 @@ abstract class ActionsContactCardCommon } } } + return 0; } /** diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index b7cde7e612c..9c3607cc412 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -46,11 +46,11 @@ abstract class ActionsCardCommon /** * Instantiation of DAO class - * TODO This method is useless * - * @return void + * @return int 0 + * @deprecated Using getInstanceDao should not be used. */ - protected function getInstanceDao() + private function getInstanceDao() { if (! is_object($this->object)) { @@ -67,6 +67,7 @@ abstract class ActionsCardCommon } } } + return 0; } /** @@ -78,7 +79,7 @@ abstract class ActionsCardCommon */ protected function getObject($id,$ref='') { - $ret = $this->getInstanceDao(); + //$ret = $this->getInstanceDao(); $object = new Societe($this->db); if (! empty($id) || ! empty($ref)) $object->fetch($id,$ref);