Fix qodana

This commit is contained in:
Laurent Destailleur 2023-02-22 16:27:10 +01:00
parent cf323002af
commit 04a6a0a043
3 changed files with 14 additions and 10 deletions

View File

@ -74,8 +74,10 @@ abstract class ActionsContactCardCommon
if (!empty($id)) { if (!empty($id)) {
$object->fetch($id); $object->fetch($id);
} }
$this->object = $object;
//} $this->object = $object;
return $object;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps

View File

@ -27,7 +27,6 @@
*/ */
class Validate class Validate
{ {
/** /**
* @var DoliDb Database handler (result of a new DoliDB) * @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')) { if (!is_object($this->outputLang) || !method_exists($this->outputLang, 'load')) {
return false; return;
} }
$this->outputLang->loadLangs(array('validate', 'errors')); $this->outputLang->loadLangs(array('validate', 'errors'));
@ -72,7 +71,8 @@ class Validate
/** /**
* Use to clear errors msg or other ghost vars * Use to clear errors msg or other ghost vars
* @return null *
* @return void
*/ */
protected function clear() protected function clear()
{ {
@ -82,8 +82,8 @@ class Validate
/** /**
* Use to clear errors msg or other ghost vars * Use to clear errors msg or other ghost vars
* *
* @param string $errMsg your error message * @param string $errMsg your error message
* @return null * @return void
*/ */
protected function setError($errMsg) protected function setError($errMsg)
{ {
@ -93,9 +93,9 @@ class Validate
/** /**
* Check for e-mail validity * Check for e-mail validity
* *
* @param string $email e-mail address to validate * @param string $email e-mail address to validate
* @param int $maxLength string max length * @param int $maxLength string max length
* @return boolean Validity is ok or not * @return boolean Validity is ok or not
*/ */
public function isEmail($email, $maxLength = false) public function isEmail($email, $maxLength = false)
{ {

View File

@ -70,6 +70,8 @@ abstract class ActionsCardCommon
$object->fetch($id, $ref); $object->fetch($id, $ref);
} }
$this->object = $object; $this->object = $object;
return $object;
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps