diff --git a/htdocs/contact/canvas/actions_contactcard_common.class.php b/htdocs/contact/canvas/actions_contactcard_common.class.php index 4a3fc28c9de..7e73d264480 100644 --- a/htdocs/contact/canvas/actions_contactcard_common.class.php +++ b/htdocs/contact/canvas/actions_contactcard_common.class.php @@ -74,8 +74,10 @@ abstract class ActionsContactCardCommon if (!empty($id)) { $object->fetch($id); } - $this->object = $object; - //} + + $this->object = $object; + + return $object; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps diff --git a/htdocs/core/class/validate.class.php b/htdocs/core/class/validate.class.php index 31cf6300aff..37bb37aec4f 100644 --- a/htdocs/core/class/validate.class.php +++ b/htdocs/core/class/validate.class.php @@ -27,7 +27,6 @@ */ class Validate { - /** * @var DoliDb Database handler (result of a new DoliDB) */ @@ -62,7 +61,7 @@ class Validate } if (!is_object($this->outputLang) || !method_exists($this->outputLang, 'load')) { - return false; + return; } $this->outputLang->loadLangs(array('validate', 'errors')); @@ -72,7 +71,8 @@ class Validate /** * Use to clear errors msg or other ghost vars - * @return null + * + * @return void */ protected function clear() { @@ -82,8 +82,8 @@ class Validate /** * Use to clear errors msg or other ghost vars * - * @param string $errMsg your error message - * @return null + * @param string $errMsg your error message + * @return void */ protected function setError($errMsg) { @@ -93,9 +93,9 @@ class Validate /** * Check for e-mail validity * - * @param string $email e-mail address to validate - * @param int $maxLength string max length - * @return boolean Validity is ok or not + * @param string $email e-mail address to validate + * @param int $maxLength string max length + * @return boolean Validity is ok or not */ public function isEmail($email, $maxLength = false) { diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index fc8794aa1a8..a2b320e50db 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -70,6 +70,8 @@ abstract class ActionsCardCommon $object->fetch($id, $ref); } $this->object = $object; + + return $object; } // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps