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 b038840621f..9fda4e37901 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -231,9 +231,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 5d7664b13aa..6b7462ba42a 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -2454,6 +2454,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 b1bac5ce84a..92061ca6cec 100644 --- a/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php +++ b/htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php @@ -83,6 +83,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 5918b1a5414..c1de096fc7a 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 b1084b01a54..a1539923117 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 0210491fba7..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) { @@ -1055,4 +1055,3 @@ class BlockedLog } } - diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 79b72a5a54c..f51fa829912 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -943,6 +943,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 @@ -2282,4 +2283,3 @@ class AccountLine extends CommonObject } } - 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 d7df30d5ee5..92ebbfaeedb 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -1334,6 +1334,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 7ce88151000..51f57dc7eab 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6810,6 +6810,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 ce13aa473c3..fbd7b7b1448 100644 --- a/htdocs/core/class/coreobject.class.php +++ b/htdocs/core/class/coreobject.class.php @@ -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) { diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index 86105133c4c..f04cfad54bc 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -203,7 +203,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