From 051ccf30a1b27b2d111e2e1e87680c5976b35e0f Mon Sep 17 00:00:00 2001
From: Scrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com>
Date: Sat, 9 Apr 2016 17:32:05 +0000
Subject: [PATCH] Scrutinizer Auto-Fixes

This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
---
 htdocs/core/class/commonobject.class.php      |  2 +-
 htdocs/core/class/fileupload.class.php        | 12 ++++++------
 htdocs/core/class/hookmanager.class.php       |  2 +-
 htdocs/core/class/html.form.class.php         | 16 ++++++++--------
 htdocs/core/lib/functions2.lib.php            |  2 +-
 htdocs/holiday/class/holiday.class.php        |  4 ++--
 htdocs/livraison/class/livraison.class.php    |  8 ++++----
 htdocs/societe/class/api_contact.class.php    |  2 +-
 htdocs/societe/class/api_thirdparty.class.php |  2 +-
 9 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index 1468b971a45..7de64135245 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -4392,7 +4392,7 @@ abstract class CommonObject
 	 * @param DoliDB 	$db 			Database handler
 	 * @param int 		$origin_id 		Old thirdparty id (the thirdparty to delete)
 	 * @param int 		$dest_id 		New thirdparty id (the thirdparty that will received element of the other)
-	 * @param array 	$tables 		Tables that need to be changed
+	 * @param string[] 	$tables 		Tables that need to be changed
 	 * @return bool
 	 */
 	public static function commonReplaceThirdparty(DoliDB $db, $origin_id, $dest_id, array $tables)
diff --git a/htdocs/core/class/fileupload.class.php b/htdocs/core/class/fileupload.class.php
index 83257cc0ef7..b8c0472b751 100644
--- a/htdocs/core/class/fileupload.class.php
+++ b/htdocs/core/class/fileupload.class.php
@@ -261,7 +261,7 @@ class FileUpload
 	 *
 	 *  @param	string	$file_name		Filename
 	 *  @param	string	$options 		is array('max_width', 'max_height')
-	 *  @return	void
+	 *  @return	boolean
 	 */
 	protected function createScaledImage($file_name, $options)
 	{
@@ -377,10 +377,10 @@ class FileUpload
 	/**
 	 * Enter description here ...
 	 *
-	 * @param 	unknown_type $name		Filename
-	 * @param 	unknown_type $type		???
-	 * @param 	unknown_type $index		???
-	 * @return	void
+	 * @param 	string $name		Filename
+	 * @param 	string $type		???
+	 * @param 	string $index		???
+	 * @return	string
 	 */
 	protected function trimFileName($name, $type, $index)
 	{
@@ -407,7 +407,7 @@ class FileUpload
 	 * Enter description here ...
 	 *
 	 * @param 	unknown_type 	$file_path		???
-	 * @return	int				Success or not
+	 * @return	boolean				Success or not
 	 */
 	protected function orientImage($file_path)
 	{
diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php
index df24b5a36ca..f92056893b6 100644
--- a/htdocs/core/class/hookmanager.class.php
+++ b/htdocs/core/class/hookmanager.class.php
@@ -64,7 +64,7 @@ class HookManager
 	 *  class found into file /mymodule/class/actions_mymodule.class.php (if module has declared the context as a managed context).
 	 *  Then when a hook executeHooks('aMethod'...) is called, the method aMethod found into class will be executed.
 	 *
-	 *	@param	array	$arraycontext	    Array list of searched hooks tab/features. For example: 'thirdpartycard' (for hook methods into page card thirdparty), 'thirdpartydao' (for hook methods into Societe), ...
+	 *	@param	string[]	$arraycontext	    Array list of searched hooks tab/features. For example: 'thirdpartycard' (for hook methods into page card thirdparty), 'thirdpartydao' (for hook methods into Societe), ...
 	 *	@return	int							Always 1
 	 */
 	function initHooks($arraycontext)
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 9a1d5e1f6c3..082f362458b 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -1345,7 +1345,7 @@ class Form
      *  @param	int		$maxlength		Maximum length of string into list (0=no limit)
      *  @param	int		$showstatus		0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status
      *  @param	string	$morefilter		Add more filters into sql request
-     *  @param	string	$show_every		0=default list, 1=add also a value "Everybody" at beginning of list
+     *  @param	integer	$show_every		0=default list, 1=add also a value "Everybody" at beginning of list
      *  @param	string	$enableonlytext	If option $enableonly is set, we use this text to explain into label why record is disabled. Not used if enableonly is empty.
      *  @param	string	$morecss		More css
      *  @param  int     $noactive       Show only active users (this will also happened whatever is this option if USER_HIDE_INACTIVE_IN_COMBOBOX is on). 
@@ -2288,7 +2288,7 @@ class Form
      *
      *  @param		int		$productid       Id of product
      *  @param      string	$htmlname        Name of HTML field
-     *  @return		void
+     *  @return		string|null
      */
     function select_product_fourn_price($productid,$htmlname='productfournpriceid')
     {
@@ -2400,7 +2400,7 @@ class Form
      *    @param    int		$socid				Id of company
      *    @param    string	$htmlname          	Name of HTML field
      *    @param    int		$showempty         	Add an empty field
-     *    @return	void
+     *    @return	integer|null
      */
     function select_address($selected, $socid, $htmlname='address_id',$showempty=0)
     {
@@ -3651,7 +3651,7 @@ class Form
      *    @param    int			$displayhour 	Display hour selector
      *    @param    int			$displaymin		Display minutes selector
      *    @param	int			$nooutput		1=No print output, return string
-     *    @return	void
+     *    @return	string
      *    @see		select_date
      */
     function form_date($page, $selected, $htmlname, $displayhour=0, $displaymin=0, $nooutput=0)
@@ -4302,7 +4302,7 @@ class Form
      *  @param  int			$fullday        When a checkbox with this html name is on, hour and day are set with 00:00 or 23:59
      *  @param	string		$addplusone		Add a link "+1 hour". Value must be name of another select_date field.
      *  @param  datetime    $adddateof      Add a link "Date of invoice" using the following date.
-     * 	@return	mixed						Nothing or string if nooutput is 1
+     * 	@return	string|null						Nothing or string if nooutput is 1
      *  @see	form_date
      */
     function select_date($set_time='', $prefix='re', $h=0, $m=0, $empty=0, $form_name="", $d=1, $addnowlink=0, $nooutput=0, $disabled=0, $fullday='', $addplusone='', $adddateof='')
@@ -4585,9 +4585,9 @@ class Form
      *	@param  int		$iSecond  		Default preselected duration (number of seconds or '')
      * 	@param	int		$disabled		Disable the combo box
      * 	@param	string	$typehour		If 'select' then input hour and input min is a combo, if 'text' input hour is in text and input min is a combo
-     *  @param	string	$minunderhours	If 1, show minutes selection under the hours
+     *  @param	integer	$minunderhours	If 1, show minutes selection under the hours
      * 	@param	int		$nooutput		Do not output html string but return it
-     *  @return	void
+     *  @return	string|null
      */
     function select_duration($prefix, $iSecond='', $disabled=0, $typehour='select', $minunderhours=0, $nooutput=0)
     {
@@ -4769,7 +4769,7 @@ class Form
      *  @param	string	$morecss				Add more class to css styles
      *  @param  int     $callurlonselect        If set to 1, some code is added so an url return by the ajax is called when value is selected.
      *  @param  string  $placeholder            String to use as placeholder
-     *  @param  string  $acceptdelayedhtml      1 if caller request to have html delayed content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect)
+     *  @param  integer  $acceptdelayedhtml      1 if caller request to have html delayed content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect)
      * 	@return	string   						HTML select string
      */
     static function selectArrayAjax($htmlname, $url, $id='', $moreparam='', $moreparamtourl='', $disabled=0, $minimumInputLength=1, $morecss='', $callurlonselect=0, $placeholder='', $acceptdelayedhtml=0)
diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php
index b4feef3ea0c..5f57234d4bb 100644
--- a/htdocs/core/lib/functions2.lib.php
+++ b/htdocs/core/lib/functions2.lib.php
@@ -581,7 +581,7 @@ function isValidUrl($url,$http=0,$pass=0,$port=0,$path=0,$query=0,$anchor=0)
  *	Clean an url string
  *
  *	@param	string	$url		Url
- *	@param  string	$http		1 = keep both http:// and https://, 0: remove http:// but not https://
+ *	@param  integer	$http		1 = keep both http:// and https://, 0: remove http:// but not https://
  *	@return string				Cleaned url
  */
 function clean_url($url,$http=1)
diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php
index 4e5706f94c6..fb791d84ee6 100644
--- a/htdocs/holiday/class/holiday.class.php
+++ b/htdocs/holiday/class/holiday.class.php
@@ -1584,7 +1584,7 @@ class Holiday extends CommonObject
     /**
      * Select event
      *
-     * @return string|boolean		Select Html to select type of holiday
+     * @return string|false		Select Html to select type of holiday
      */
     function selectEventCP()
     {
@@ -1641,7 +1641,7 @@ class Holiday extends CommonObject
      * getValueEventCp
      *
      * @param 	int		$rowid		Row id
-     * @return string|boolean
+     * @return string|false
      */
     function getValueEventCp($rowid) {
 
diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php
index 14a83aca2f7..f77239535a6 100644
--- a/htdocs/livraison/class/livraison.class.php
+++ b/htdocs/livraison/class/livraison.class.php
@@ -250,7 +250,7 @@ class Livraison extends CommonObject
 	 * 	Load a delivery receipt
 	 *
 	 * 	@param	int		$id			Id of object to load
-	 * 	@return	void
+	 * 	@return	integer
 	 */
 	function fetch($id)
 	{
@@ -492,7 +492,7 @@ class Livraison extends CommonObject
 	 *
 	 *	@param	User	$user            Utilisateur qui cree
 	 *	@param  int		$sending_id      Id de l'expedition qui sert de modele
-	 *	@return	void
+	 *	@return	integer
 	 */
 	function create_from_sending($user, $sending_id)
 	{
@@ -585,7 +585,7 @@ class Livraison extends CommonObject
 	 *	Delete line
 	 *
 	 *	@param	int		$lineid		Line id
-	 *	@return	void
+	 *	@return	integer|null
 	 */
 	function deleteline($lineid)
 	{
@@ -610,7 +610,7 @@ class Livraison extends CommonObject
 	/**
 	 * Delete object
 	 *
-	 * @return	void
+	 * @return	integer
 	 */
 	function delete()
 	{
diff --git a/htdocs/societe/class/api_contact.class.php b/htdocs/societe/class/api_contact.class.php
index 09f92dd1364..f2c19f2e484 100644
--- a/htdocs/societe/class/api_contact.class.php
+++ b/htdocs/societe/class/api_contact.class.php
@@ -249,7 +249,7 @@ class ContactApi extends DolibarrApi
 	 * Delete contact
 	 *
 	 * @param   int     $id Contact ID
-	 * @return  array
+	 * @return  integer
      * 
 	 * @url	DELETE contact/{id}
 	 */
diff --git a/htdocs/societe/class/api_thirdparty.class.php b/htdocs/societe/class/api_thirdparty.class.php
index a30e148b3d2..d56c269e08e 100644
--- a/htdocs/societe/class/api_thirdparty.class.php
+++ b/htdocs/societe/class/api_thirdparty.class.php
@@ -270,7 +270,7 @@ class ThirdpartyApi extends DolibarrApi
      * Delete thirdparty
      *
      * @param int $id   Thirparty ID
-     * @return type
+     * @return integer
      * 
      * @url	DELETE thirdparty/{id}
      */
-- 
GitLab