--- /tmp/dsg/dolibarr/htdocs/core/modules/contract/github_mod_contract_magre.php +++ /tmp/dsg/dolibarr/htdocs/core/modules/contract/client_mod_contract_magre.php @@ -31,9 +31,9 @@ class mod_contract_magre extends ModelNumRefContracts { /** - * Dolibarr version of the loaded document - * @var string - */ + * Dolibarr version of the loaded document + * @var string + */ public $version = 'dolibarr'; /** @@ -63,9 +63,9 @@ * * @return string text description */ - public function info() - { - global $conf, $langs, $db; + public function info() + { + global $conf, $langs, $db; $langs->load("bills"); @@ -92,20 +92,20 @@ $texte .= ''; return $texte; - } + } /** * Return numbering example * * @return string Example */ - public function getExample() - { - global $conf, $langs, $mysoc; + public function getExample() + { + global $conf, $langs, $mysoc; - $old_code_client = $mysoc->code_client; - $mysoc->code_client = 'CCCCCCCCCC'; - $numExample = $this->getNextValue($mysoc, ''); + $old_code_client = $mysoc->code_client; + $mysoc->code_client = 'CCCCCCCCCC'; + $numExample = $this->getNextValue($mysoc, ''); $mysoc->code_client = $old_code_client; if (!$numExample) @@ -113,7 +113,7 @@ $numExample = $langs->trans('NotConfigured'); } return $numExample; - } + } /** * Return next value @@ -122,8 +122,8 @@ * @param Object $contract contract object * @return string Value if OK, 0 if KO */ - public function getNextValue($objsoc, $contract) - { + public function getNextValue($objsoc, $contract) + { global $db, $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; @@ -141,17 +141,17 @@ return $numFinal; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return next value * * @param Societe $objsoc third party object * @param Object $objforref contract object * @return string Value if OK, 0 if KO - */ - public function contract_get_num($objsoc, $objforref) - { - // phpcs:enable - return $this->getNextValue($objsoc, $objforref); - } + */ + public function contract_get_num($objsoc, $objforref) + { + // phpcs:enable + return $this->getNextValue($objsoc, $objforref); + } } --- /tmp/dsg/dolibarr/htdocs/core/modules/contract/github_mod_contract_olive.php +++ /tmp/dsg/dolibarr/htdocs/core/modules/contract/client_mod_contract_olive.php @@ -32,7 +32,7 @@ */ class mod_contract_olive extends ModelNumRefContracts { - /** + /** * @var string Nom du modele * @deprecated * @see $name @@ -53,9 +53,9 @@ public $code_null = 1; // Code facultatif /** - * Dolibarr version of the loaded document - * @var string - */ + * Dolibarr version of the loaded document + * @var string + */ public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' /** @@ -114,7 +114,8 @@ if (empty($code) && $this->code_null && empty($conf->global->MAIN_CONTARCT_CODE_ALWAYS_REQUIRED)) { $result = 0; - } elseif (empty($code) && (!$this->code_null || !empty($conf->global->MAIN_CONTARCT_CODE_ALWAYS_REQUIRED))) + } + elseif (empty($code) && (!$this->code_null || !empty($conf->global->MAIN_CONTARCT_CODE_ALWAYS_REQUIRED))) { $result = -2; } --- /tmp/dsg/dolibarr/htdocs/core/modules/contract/github_mod_contract_serpis.php +++ /tmp/dsg/dolibarr/htdocs/core/modules/contract/client_mod_contract_serpis.php @@ -29,9 +29,9 @@ class mod_contract_serpis extends ModelNumRefContracts { /** - * Dolibarr version of the loaded document - * @var string - */ + * Dolibarr version of the loaded document + * @var string + */ public $version = 'dolibarr'; public $prefix = 'CT'; @@ -64,11 +64,11 @@ * * @return string text description */ - public function info() - { - global $langs; - return $langs->trans("SimpleNumRefModelDesc", $this->prefix); - } + public function info() + { + global $langs; + return $langs->trans("SimpleNumRefModelDesc", $this->prefix); + } /** @@ -138,7 +138,9 @@ $obj = $db->fetch_object($resql); if ($obj) $max = intval($obj->max); else $max = 0; - } else { + } + else + { dol_syslog("mod_contract_serpis::getNextValue", LOG_DEBUG); return -1; } @@ -154,7 +156,7 @@ } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return next value * @@ -164,7 +166,7 @@ */ public function contract_get_num($objsoc, $objforref) { - // phpcs:enable + // phpcs:enable return $this->getNextValue($objsoc, $objforref); } } --- /tmp/dsg/dolibarr/htdocs/core/modules/contract/github_modules_contract.php +++ /tmp/dsg/dolibarr/htdocs/core/modules/contract/client_modules_contract.php @@ -43,17 +43,17 @@ public $error = ''; - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return list of active generation modules * - * @param DoliDB $db Database handler - * @param integer $maxfilenamelength Max length of value to show - * @return array List of templates + * @param DoliDB $db Database handler + * @param integer $maxfilenamelength Max length of value to show + * @return array List of templates */ - public static function liste_modeles($db, $maxfilenamelength = 0) + public static function liste_modeles($db, $maxfilenamelength = 0) { - // phpcs:enable + // phpcs:enable global $conf; $type = 'contract';