diff --git a/build/rpm/dolibarr_fedora.spec b/build/rpm/dolibarr_fedora.spec index 65da8cabfd7..d5a9189229e 100755 --- a/build/rpm/dolibarr_fedora.spec +++ b/build/rpm/dolibarr_fedora.spec @@ -212,6 +212,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/theme +%_datadir/dolibarr/htdocs/ticket %_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/variants %_datadir/dolibarr/htdocs/webservices diff --git a/build/rpm/dolibarr_generic.spec b/build/rpm/dolibarr_generic.spec index 2fed89c03f3..673d5919d1a 100755 --- a/build/rpm/dolibarr_generic.spec +++ b/build/rpm/dolibarr_generic.spec @@ -292,6 +292,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/theme +%_datadir/dolibarr/htdocs/ticket %_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/variants %_datadir/dolibarr/htdocs/webservices diff --git a/build/rpm/dolibarr_mandriva.spec b/build/rpm/dolibarr_mandriva.spec index fb15a2d2d92..e3d2a849db2 100755 --- a/build/rpm/dolibarr_mandriva.spec +++ b/build/rpm/dolibarr_mandriva.spec @@ -209,6 +209,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/theme +%_datadir/dolibarr/htdocs/ticket %_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/variants %_datadir/dolibarr/htdocs/webservices diff --git a/build/rpm/dolibarr_opensuse.spec b/build/rpm/dolibarr_opensuse.spec index 70eba841bd8..5a64bec2e78 100755 --- a/build/rpm/dolibarr_opensuse.spec +++ b/build/rpm/dolibarr_opensuse.spec @@ -220,6 +220,7 @@ done >>%{name}.lang %_datadir/dolibarr/htdocs/supplier_proposal %_datadir/dolibarr/htdocs/support %_datadir/dolibarr/htdocs/theme +%_datadir/dolibarr/htdocs/ticket %_datadir/dolibarr/htdocs/user %_datadir/dolibarr/htdocs/variants %_datadir/dolibarr/htdocs/webservices diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index e16dfa29fcc..81bb53b4ad8 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -218,9 +218,9 @@ 5 - + 0 diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php index 52b5f1c411f..376dd9df487 100644 --- a/htdocs/accountancy/class/accountancyexport.class.php +++ b/htdocs/accountancy/class/accountancyexport.class.php @@ -185,6 +185,7 @@ class AccountancyExport * Function who chose which export to use with the default config * * @param unknown $TData data + * @return void */ public function export(&$TData) { global $conf, $langs; @@ -602,6 +603,7 @@ class AccountancyExport * * @param unknown $str data * @param integer $size data + * @return string */ public static function trunc($str, $size) { return dol_trunc($str, $size, 'right', 'UTF-8', 1); diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 00c41d7a500..16e0224a79e 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2466,6 +2466,7 @@ class Adherent extends CommonObject * Existing categories are left untouch. * * @param int[]|int $categories Category or categories IDs + * @return void */ public function setCategories($categories) { diff --git a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php index c6e33023e4c..cd99f53a47b 100644 --- a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php +++ b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php @@ -82,6 +82,7 @@ class PrestaShopWebservice * Take the status code and throw an exception if the server didn't return 200 or 201 code * * @param int $status_code Status code of an HTTP return + * @return void */ protected function checkStatusCode($status_code) { diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 6c2f92510dd..cbf68035c47 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -217,6 +217,7 @@ class DolibarrApi * @param string $feature2 Feature to check, second level of permission (optional). Can be or check with 'level1|level2'. * @param string $dbt_keyfield Field name for socid foreign key if not fk_soc. Not used if objectid is null (optional) * @param string $dbt_select Field name for select if not rowid. Not used if objectid is null (optional) + * @return bool * @throws RestException */ static function _checkAccessToResource($resource, $resource_id=0, $dbtablename='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid') { diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index fe4c73e91fd..1a958210559 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -188,6 +188,7 @@ class Setup extends DolibarrApi * @param int $id ID of country * @param string $lang Code of the language the name of the * country must be translated to + * @return array Array of cleaned object properties * * @url GET dictionary/countries/{id} * @@ -293,6 +294,7 @@ class Setup extends DolibarrApi * @param Ccountry $country Country * @param string $lang Code of the language the name of the * country must be translated to + * @return void */ private function translateLabel($country, $lang) { diff --git a/htdocs/api/class/api_status.class.php b/htdocs/api/class/api_status.class.php index ea61731b51a..22f20c0aa34 100644 --- a/htdocs/api/class/api_status.class.php +++ b/htdocs/api/class/api_status.class.php @@ -28,6 +28,7 @@ class Status { /** * Get status (Dolibarr version) + * @return array */ function index() { global $conf; diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php index e6fdd1d38a1..0580b12d0f8 100644 --- a/htdocs/blockedlog/class/authority.class.php +++ b/htdocs/blockedlog/class/authority.class.php @@ -105,7 +105,8 @@ class BlockedLogAuthority /** * Add a new block to the chain * - * @param string $block new block to chain + * @param string $block new block to chain + * @return void */ public function addBlock($block) { diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index cbe0e6860f8..bada3f2951d 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -18,9 +18,6 @@ * See https://medium.com/@lhartikk/a-blockchain-in-200-lines-of-code-963cc1cc0e54 */ - - - /*ini_set('unserialize_callback_func', 'mycallback'); function mycallback($classname) @@ -171,6 +168,7 @@ class BlockedLog /** * Try to retrieve source object (it it still exists) + * @return string */ public function getObjectLink() { @@ -286,6 +284,7 @@ class BlockedLog /** * try to retrieve user author + * @return string */ public function getUser() { @@ -1029,6 +1028,7 @@ class BlockedLog * Check if module was already used or not for at least one recording. * * @param int $ignoresystem Ignore system events for the test + * @return bool */ function alreadyUsed($ignoresystem=0) { diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index a02186bc1c5..94a211170b7 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -946,6 +946,7 @@ class Account extends CommonObject * Existing categories are left untouch. * * @param int[]|int $categories Category or categories IDs + * @return void */ public function setCategories($categories) { // Handle single category diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index e411f8c5b1b..f2a137f0d8f 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -4030,8 +4030,6 @@ else if ($id > 0 || ! empty($ref)) print ''; - // List of previous situation invoices - $sign = 1; if ($object->type == Facture::TYPE_CREDIT_NOTE) $sign = - 1; $nbrows = 8; @@ -4372,7 +4370,7 @@ else if ($id > 0 || ! empty($ref)) } else // Credit note { - $cssforamountpaymentcomplete=''; + $cssforamountpaymentcomplete='amountpaymentneutral'; // Total already paid back print ''; @@ -4387,7 +4385,7 @@ else if ($id > 0 || ! empty($ref)) if ($resteapayeraffiche <= 0) print $langs->trans('RemainderToPayBack'); else - print $langs->trans('ExcessPaydBack'); + print $langs->trans('ExcessPaid'); print ' :'; print '' . price($sign * $resteapayeraffiche) . ''; print ' '; diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index ae58d0b6e4b..5fc94c99995 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1341,6 +1341,7 @@ class Contact extends CommonObject * Existing categories are left untouch. * * @param int[]|int $categories Category or categories IDs + * @return void */ public function setCategories($categories) { diff --git a/htdocs/core/ajax/ziptown.php b/htdocs/core/ajax/ziptown.php index 9fa475039d9..2100d3d3600 100644 --- a/htdocs/core/ajax/ziptown.php +++ b/htdocs/core/ajax/ziptown.php @@ -120,6 +120,7 @@ if (! empty($_GET['zipcode']) || ! empty($_GET['town'])) $row_array['selectcountry_id'] = $row['fk_country']; $row_array['state_id'] = $row['fk_county']; + // TODO Use a cache here to avoid to make select_state in each pass (this make a SQL and lot of logs) $row_array['states'] = $formcompany->select_state('',$row['fk_country'],''); array_push($return_arr,$row_array); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b6b27708ffa..6a49dd53a92 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6841,6 +6841,7 @@ abstract class CommonObject * Function to load data from a SQL pointer into properties of current object $this * * @param stdClass $obj Contain data of object from database + * @return void */ protected function setVarsFromFetchObj(&$obj) { diff --git a/htdocs/core/class/coreobject.class.php b/htdocs/core/class/coreobject.class.php index 1456fb991c2..fbd7b7b1448 100644 --- a/htdocs/core/class/coreobject.class.php +++ b/htdocs/core/class/coreobject.class.php @@ -1,6 +1,6 @@ * * This program is free software; you can redistribute it and/or modify @@ -22,7 +22,7 @@ * \ingroup core * \brief File of class to manage all object. Might be replace or merge into commonobject */ - + require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php'; class CoreObject extends CommonObject @@ -54,7 +54,7 @@ class CoreObject extends CommonObject $this->id = 0; $this->datec = 0; $this->tms = 0; - + if (!empty($this->fields)) { foreach ($this->fields as $field=>$info) @@ -68,14 +68,14 @@ class CoreObject extends CommonObject $this->to_delete=false; $this->is_clone=false; - + return true; } else { return false; } - + } /** @@ -110,7 +110,7 @@ class CoreObject extends CommonObject if($res>0) { if ($loadChild) $this->fetchChild(); } - + return $res; } @@ -133,14 +133,14 @@ class CoreObject extends CommonObject if($object->{$key} === $id) return $k; } } - + $k = count($this->{$tabName}); - + $className = ucfirst($tabName); $this->{$tabName}[$k] = new $className($this->db); if($id>0 && $key==='id' && $try_to_load) { - $this->{$tabName}[$k]->fetch($id); + $this->{$tabName}[$k]->fetch($id); } return $k; @@ -171,6 +171,8 @@ class CoreObject extends CommonObject /** * Function to fetch children objects + * + * @return void */ public function fetchChild() { @@ -207,6 +209,7 @@ class CoreObject extends CommonObject * Function to update children data * * @param User $user user object + * @return void */ public function saveChild(User &$user) { @@ -220,7 +223,7 @@ class CoreObject extends CommonObject foreach($this->{$className} as $i => &$object) { $object->{$this->fk_element} = $this->id; - + $object->update($user); if($this->unsetChildDeleted && isset($object->to_delete) && $object->to_delete==true) unset($this->{$className}[$i]); } diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 2e5658d6757..5c09d0a3ade 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -206,7 +206,7 @@ class FormCompany * * @param string $selected Code state preselected (mus be state id) * @param integer $country_codeid Country code or id: 0=list for all countries, otherwise country code or country rowid to show - * @param string $htmlname Id of department + * @param string $htmlname Id of department. If '', we want only the string with