diff --git a/htdocs/accountancy/class/accountancyexport.class.php b/htdocs/accountancy/class/accountancyexport.class.php
index 8b03b552073ed182d04787711211f281db44b9f3..c15bd8e497e372739e0d94f96db4f74103c9d415 100644
--- a/htdocs/accountancy/class/accountancyexport.class.php
+++ b/htdocs/accountancy/class/accountancyexport.class.php
@@ -277,7 +277,7 @@ class AccountancyExport
 	/**
 	 *
 	 * @param unknown $str data
-	 * @param unknown $size data
+	 * @param integer $size data
 	 */
 	public static function trunc($str, $size)
 	{
diff --git a/htdocs/commande/class/api_commande.class.php b/htdocs/commande/class/api_commande.class.php
index e8266fe6383493f4e237319d4f2c8f55429028c2..b7b6cb0c21cf17430bb7819900265a266f7b6000 100644
--- a/htdocs/commande/class/api_commande.class.php
+++ b/htdocs/commande/class/api_commande.class.php
@@ -186,7 +186,7 @@ class CommandeApi extends DolibarrApi
      * 
      * @url     POST    order/
      * 
-     * @return  int     ID of commande
+     * @return  string     ID of commande
      */
     function post($request_data = NULL)
     {
diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php
index 3593d67448acd0ec4decdcb59bc7db10e3d805e6..7194f1f5da64a01f4402e59b8486d56b01ad338a 100644
--- a/htdocs/core/class/html.formactions.class.php
+++ b/htdocs/core/class/html.formactions.class.php
@@ -52,8 +52,8 @@ class FormActions
      * 	@param	string	$selected		Preselected value (-1..100)
      * 	@param	int		$canedit		1=can edit, 0=read only
      *  @param  string	$htmlname   	Name of html prefix for html fields (selectX and valX)
-     *  @param	string	$showempty		Show an empty line if select is used
-     *  @param	string	$onlyselect		0=Standard, 1=Hide percent of completion and force usage of a select list, 2=Same than 1 and add "Incomplete (Todo+Running)
+     *  @param	integer	$showempty		Show an empty line if select is used
+     *  @param	integer	$onlyselect		0=Standard, 1=Hide percent of completion and force usage of a select list, 2=Same than 1 and add "Incomplete (Todo+Running)
      * 	@return	void
      */
     function form_select_status_action($formname,$selected,$canedit=1,$htmlname='complete',$showempty=0,$onlyselect=0)
@@ -246,7 +246,7 @@ class FormActions
      *  @param	string		$selected       Type pre-selected (can be 'manual', 'auto' or 'AC_xxx')
      *  @param  string		$htmlname       Name of select field
      *  @param	string		$excludetype	A type to exclude ('systemauto', 'system', '')
-     *  @param	string		$onlyautoornot	1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type
+     *  @param	integer		$onlyautoornot	1=Group all type AC_XXX into 1 line AC_MANUAL. 0=Keep details of type
      *  @param	int		    $hideinfohelp	1=Do not show info help, 0=Show, -1=Show+Add info to tell how to set default value
      *  @param  int		    $multiselect    1=Allow multiselect of action type
      * 	@return	void
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 3a2b21b59cca08ce94fa9d2870f9a0778554e7f6..579e83a744c880b51ec4bf5b250bba191b3200f2 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -64,9 +64,9 @@ class FormFile
      *  @param  int		$size           Length of input file area
      *  @param	Object	$object			Object to use (when attachment is done on an element)
      *  @param	string	$options		Add an option column
-     *  @param	boolean	$useajax		Use fileupload ajax (0=never, 1=if enabled, 2=always whatever is option). 2 should never be used.
+     *  @param	integer	$useajax		Use fileupload ajax (0=never, 1=if enabled, 2=always whatever is option). 2 should never be used.
      *  @param	string	$savingdocmask	Mask to use to define output filename. For example 'XXXXX-__YYYYMMDD__-__file__'
-     *  @param	string	$linkfiles		1=Also add form to link files, 0=Do not show form to link files
+     *  @param	integer	$linkfiles		1=Also add form to link files, 0=Do not show form to link files
      *  @param	string	$htmlname		Name and id of HTML form
      * 	@return	int						<0 if KO, >0 if OK
      */
@@ -227,11 +227,11 @@ class FormFile
      *      @param      int					$genallowed         Generation is allowed (1/0 or array of formats)
      *      @param      int					$delallowed         Remove is allowed (1/0)
      *      @param      string				$modelselected      Model to preselect by default
-     *      @param      string				$allowgenifempty	Show warning if no model activated
-     *      @param      string				$forcenomultilang	Do not show language option (even if MAIN_MULTILANGS defined)
+     *      @param      integer				$allowgenifempty	Show warning if no model activated
+     *      @param      integer				$forcenomultilang	Do not show language option (even if MAIN_MULTILANGS defined)
      *      @param      int					$iconPDF            Show only PDF icon with link (1/0)
      * 		@param		int					$maxfilenamelength	Max length for filename shown
-     * 		@param		string				$noform				Do not output html form tags
+     * 		@param		integer				$noform				Do not output html form tags
      * 		@param		string				$param				More param on http links
      * 		@param		string				$title				Title to show on top of form
      * 		@param		string				$buttonlabel		Label on submit button
@@ -257,11 +257,11 @@ class FormFile
      *      @param      int					$genallowed         Generation is allowed (1/0 or array list of templates)
      *      @param      int					$delallowed         Remove is allowed (1/0)
      *      @param      string				$modelselected      Model to preselect by default
-     *      @param      string				$allowgenifempty	Allow generation even if list of template ($genallowed) is empty (show however a warning)
-     *      @param      string				$forcenomultilang	Do not show language option (even if MAIN_MULTILANGS defined)
+     *      @param      integer				$allowgenifempty	Allow generation even if list of template ($genallowed) is empty (show however a warning)
+     *      @param      integer				$forcenomultilang	Do not show language option (even if MAIN_MULTILANGS defined)
      *      @param      int					$iconPDF            Deprecated, see getDocumentsLink
      * 		@param		int					$maxfilenamelength	Max length for filename shown
-     * 		@param		string				$noform				Do not output html form tags
+     * 		@param		integer				$noform				Do not output html form tags
      * 		@param		string				$param				More param on http links
      * 		@param		string				$title				Title to show on top of form
      * 		@param		string				$buttonlabel		Label on submit button
diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php
index 93ffb57930edbeaaf68dc7b0671ef87fc0da55c8..b784577bce350133ccf216db68b37152db0d0b94 100644
--- a/htdocs/core/class/smtps.class.php
+++ b/htdocs/core/class/smtps.class.php
@@ -384,7 +384,7 @@ class SMTPs
 	/**
 	 * Attempt mail server authentication for a secure connection
 	 *
-	 * @return mixed  $_retVal   Boolean indicating success or failure of authentication
+	 * @return boolean|null  $_retVal   Boolean indicating success or failure of authentication
 	 */
 	function _server_authenticate()
 	{
@@ -441,7 +441,7 @@ class SMTPs
 	 *
 	 * @param  boolean $_bolTestMsg  whether to run this method in 'Test' mode.
 	 * @param  boolean $_bolDebug    whether to log all communication between this Class and the Mail Server.
-	 * @return mixed   void
+	 * @return boolean|null   void
 	 *                 $_strMsg      If this is run in 'Test' mode, the actual message structure will be returned
 	 */
 	function sendMsg($_bolTestMsg = false, $_bolDebug = false)
@@ -541,7 +541,7 @@ class SMTPs
 	 * defined.
 	 *
 	 * @param mixed $_strConfigPath path to config file or VOID
-	 * @return void
+	 * @return boolean
 	 */
 	function setConfig($_strConfigPath = null)
 	{
@@ -615,7 +615,7 @@ class SMTPs
 	 * Path to the sendmail execuable
 	 *
 	 * @param string $_path Path to the sendmail execuable
-	 * @return void
+	 * @return boolean
 	 *
 	 */
 	function setMailPath($_path)
@@ -1020,8 +1020,8 @@ class SMTPs
 	/**
 	 * Returns an array of addresses for a specific type; TO, CC or BCC
 	 *
-	 * @param 		mixed 	$_which 	Which collection of adresses to return
-	 * @return 		array 				Array of emaill address
+	 * @param 		string 	$_which 	Which collection of adresses to return
+	 * @return 		string|false 				Array of emaill address
 	 */
 	function get_email_list($_which = null)
 	{
@@ -1071,7 +1071,7 @@ class SMTPs
 	/**
 	 * TO Address[es] inwhich to send mail to
 	 *
-	 * @param 	mixed 	$_addrTo 	TO Address[es] inwhich to send mail to
+	 * @param 	string 	$_addrTo 	TO Address[es] inwhich to send mail to
 	 * @return 	void
 	 */
 	function setTO($_addrTo)
@@ -1456,7 +1456,7 @@ class SMTPs
 	 *   - [2] Private
 	 *   - [3] Company Confidential
 	 *
-	 * @param 	string	$_value		Message Sensitivity
+	 * @param 	integer	$_value		Message Sensitivity
 	 * @return 	void
 	 */
 	function setSensitivity($_value = 0)
@@ -1491,7 +1491,7 @@ class SMTPs
 	 *  - [4] 'Low'
 	 *  - [5] 'Lowest'
 	 *
-	 * @param 	string 	$_value 	Message Priority
+	 * @param 	integer 	$_value 	Message Priority
 	 * @return 	void
 	 */
 	function setPriority ( $_value = 3 )
@@ -1511,7 +1511,7 @@ class SMTPs
 	 *  - [4] 'Low'
 	 *  - [5] 'Lowest'
 	 *
-	 * @return void
+	 * @return string
 	 */
 	function getPriority()
 	{
@@ -1534,7 +1534,7 @@ class SMTPs
 	/**
 	 * Gets flag which determines whether to calculate message MD5 checksum.
 	 *
-	 * @return 	string 				Message Priority
+	 * @return 	boolean 				Message Priority
 	 */
 	function getMD5flag()
 	{
@@ -1558,7 +1558,7 @@ class SMTPs
 	/**
 	 * Retrieves the Message X-Header Content
 	 *
-	 * @return string $_msgContent Message X-Header Content
+	 * @return string[] $_msgContent Message X-Header Content
 	 */
 	function getXheader()
 	{
@@ -1632,7 +1632,7 @@ class SMTPs
 	 * @param	string		$_strSend		String to send
 	 * @param 	string		$_returnCode	Return code
 	 * @param 	string		$CRLF			CRLF
-	 * @return 	boolean						True or false
+	 * @return 	boolean|null						True or false
 	 */
 	function socket_send_str( $_strSend, $_returnCode = null, $CRLF = "\r\n" )
 	{
diff --git a/htdocs/core/filemanagerdol/connectors/php/io.php b/htdocs/core/filemanagerdol/connectors/php/io.php
index 966efd0f0af37a1632fdbc51937389e50a7957f9..b39a8cfbc947e9e49ae02badd9a1b47c85258df6 100644
--- a/htdocs/core/filemanagerdol/connectors/php/io.php
+++ b/htdocs/core/filemanagerdol/connectors/php/io.php
@@ -21,6 +21,10 @@
  *
  * This is the File Manager Connector for PHP.
  */
+/**
+ * @param string $sBasePath
+ * @param string $sFolder
+ */
 function CombinePaths( $sBasePath, $sFolder )
 {
 	return RemoveFromEnd($sBasePath, '/') . '/' . RemoveFromStart($sFolder, '/');
@@ -45,8 +49,8 @@ function GetResourceTypePath($resourceType, $sCommand)
 /**
  * GetResourceTypeDirectory
  *
- * @param unknown_type $resourceType	Resource type
- * @param unknown_type $sCommand		Command
+ * @param string $resourceType	Resource type
+ * @param string $sCommand		Command
  * @return string
  */
 function GetResourceTypeDirectory($resourceType, $sCommand)
@@ -99,7 +103,7 @@ function RemoveExtension($fileName)
  * @param 	string	$resourceType	Resource type
  * @param 	string	$folderPath		Folder
  * @param 	string	$sCommand		Command
- * @return	void
+ * @return	string
  */
 function ServerMapFolder($resourceType, $folderPath, $sCommand)
 {
@@ -380,6 +384,10 @@ EOF;
 // DOL_CHANGE
 
 // This is the function that sends the results of the uploading process to CKE.
+/**
+ * @param string $callback
+ * @param string $sFileUrl
+ */
 function SendCKEditorResults ($callback, $sFileUrl, $customMsg = '')
 {
   echo '<script type="text/javascript">';
diff --git a/htdocs/core/lib/functionsnumtoword.lib.php b/htdocs/core/lib/functionsnumtoword.lib.php
index 5e8da1960a325e4a92bf4ea9f707154bc0dd4ece..3472c846366c4af5f1d076d6df97cba05876b74b 100644
--- a/htdocs/core/lib/functionsnumtoword.lib.php
+++ b/htdocs/core/lib/functionsnumtoword.lib.php
@@ -109,6 +109,11 @@ function dolNumberToWord($numero, $langs, $numorcurrency='number')
 	}
 }
 
+/**
+ * @param integer $hundreds
+ * @param integer $tens
+ * @param integer $units
+ */
 function hundreds2text ($hundreds, $tens, $units){
 	if ($hundreds==1 && $tens==0 && $units==0){
 		return "CIEN";
diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php
index 3278f0cbdf406230a514ca2a2b3470319dd8040b..b8ddc9545e3279289e7ac9f171073a046aa4bbc9 100644
--- a/htdocs/core/lib/member.lib.php
+++ b/htdocs/core/lib/member.lib.php
@@ -110,7 +110,7 @@ function member_prepare_head(Adherent $object)
 /**
  *  Return array head with list of tabs to view object informations
  *
- *  @param	Adherent	$object         Member
+ *  @param	AdherentType	$object         Member
  *  @return array           		head
  */
 function member_type_prepare_head(AdherentType $object)
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index 9c70635a95719bab4e86ee0eeaa12a7223e3b640..d3cb3361b02ba7d4c073c345fdda320701e3dec7 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -1628,7 +1628,7 @@ function pdf_getlineqty_keeptoship($object,$i,$outputlangs,$hidedetails=0)
  *  @param  Translate	$outputlangs		Object langs for output
  *  @param	int			$hidedetails		Hide details (0=no, 1=yes, 2=just special lines)
  *  @param	HookManager	$hookmanager		Hook manager instance
- *  @return	void
+ *  @return	string
  */
 function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanager = false)
 {
diff --git a/htdocs/core/modules/expedition/modules_expedition.php b/htdocs/core/modules/expedition/modules_expedition.php
index 0cc89498dae48001b2e231d76020508d5d030162..335491c0f9dc7a4d952e331a2dddcfa2e97e837c 100644
--- a/htdocs/core/modules/expedition/modules_expedition.php
+++ b/htdocs/core/modules/expedition/modules_expedition.php
@@ -146,7 +146,7 @@ abstract class ModelNumRefExpedition
  * 	Create a document onto disk according to template module.
  *
  * 	@param		DoliDB		$db  			Objet base de donnee
- * 	@param		Object		$object			Object expedition
+ * 	@param		Expedition		$object			Object expedition
  * 	@param		string		$modele			Force le modele a utiliser ('' to not force)
  * 	@param		Translate	$outputlangs	Objet lang a utiliser pour traduction
  *  @param      int			$hidedetails    Hide details of lines
diff --git a/htdocs/core/modules/mailings/fraise.modules.php b/htdocs/core/modules/mailings/fraise.modules.php
index 42f59e7c2fb814e24c86fc6b15f99ff5c27960c4..089c42d495080494fd0f8f1194297bfc0673fa1a 100644
--- a/htdocs/core/modules/mailings/fraise.modules.php
+++ b/htdocs/core/modules/mailings/fraise.modules.php
@@ -63,7 +63,7 @@ class mailing_fraise extends MailingTargets
      *    array of SQL request that returns two field:
      *    One called "label", One called "nb".
      *
-     *    @return        array        Array with SQL requests
+     *    @return        string[]        Array with SQL requests
      */
     function getSqlArrayForStats()
     {
diff --git a/htdocs/core/modules/printing/printgcp.modules.php b/htdocs/core/modules/printing/printgcp.modules.php
index 5177e108f406345ec5c60fee23dd3160c796bbe1..7e1ce5f8d74ae9cb12fdb9f41d3d2efa22646ae9 100644
--- a/htdocs/core/modules/printing/printgcp.modules.php
+++ b/htdocs/core/modules/printing/printgcp.modules.php
@@ -25,7 +25,6 @@
 
 include_once DOL_DOCUMENT_ROOT.'/core/modules/printing/modules_printing.php';
 require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php';
-use OAuth\Common\Storage\Session;
 use OAuth\Common\Storage\DoliStorage;
 use OAuth\Common\Consumer\Credentials;
 use OAuth\OAuth2\Service\Google;
diff --git a/htdocs/core/modules/project/doc/pdf_beluga.modules.php b/htdocs/core/modules/project/doc/pdf_beluga.modules.php
index 11b1d378981131ad4c553f2a0606146865b237e6..0484e35d5415746b7b1f2728c7545aa046f31562 100644
--- a/htdocs/core/modules/project/doc/pdf_beluga.modules.php
+++ b/htdocs/core/modules/project/doc/pdf_beluga.modules.php
@@ -549,7 +549,7 @@ class pdf_beluga extends ModelePDFProjects
 	 *  Show top header of page.
 	 *
 	 *  @param	PDF			$pdf     		Object PDF
-	 *  @param  Object		$object     	Object to show
+	 *  @param  Project		$object     	Object to show
 	 *  @param  int	    	$showaddress    0=no, 1=yes
 	 *  @param  Translate	$outputlangs	Object lang for output
 	 *  @return	void
@@ -611,10 +611,10 @@ class pdf_beluga extends ModelePDFProjects
 	 *   	Show footer of page. Need this->emetteur object
      *
 	 *   	@param	PDF			$pdf     			PDF
-	 * 		@param	Object		$object				Object to show
+	 * 		@param	Project		$object				Object to show
 	 *      @param	Translate	$outputlangs		Object lang for output
 	 *      @param	int			$hidefreetext		1=Hide free text
-	 *      @return	void
+	 *      @return	integer
 	 */
 	function _pagefoot(&$pdf,$object,$outputlangs,$hidefreetext=0)
 	{
diff --git a/htdocs/core/modules/syslog/mod_syslog_sentry.php b/htdocs/core/modules/syslog/mod_syslog_sentry.php
index afea1a36375f4c91ee002d2328386a4c363df232..4332c0b2e8235f60fe4da05a2abb362d54527c9c 100644
--- a/htdocs/core/modules/syslog/mod_syslog_sentry.php
+++ b/htdocs/core/modules/syslog/mod_syslog_sentry.php
@@ -70,7 +70,7 @@ class mod_syslog_sentry extends LogHandler implements LogHandlerInterface
 	/**
 	 * Is the module active ?
 	 *
-	 * @return int
+	 * @return boolean
 	 */
 	public function isActive()
 	{