test phpcs v3

This commit is contained in:
Frédéric FRANCE 2018-08-09 11:50:07 +02:00
parent 62b83412ee
commit 79aaddbb66
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
9 changed files with 46 additions and 49 deletions

View File

@ -196,7 +196,7 @@ interface Database
*
* @param string $query SQL query string
* @param int $usesavepoint 0=Default mode, 1=Run a savepoint before and a rollback to savepoint if error (this allow to have some request with errors inside global transactions).
* Note that with Mysql, this parameter is not used as Myssql can already commit a transaction even if one request is in error, without using savepoints.
* Note that with Mysql, this parameter is not used as Myssql can already commit a transaction even if one request is in error, without using savepoints.
* @param string $type Type of SQL order ('ddl' for insert, update, select, delete or 'dml' for create, alter...)
* @return resource Resultset of answer
*/

View File

@ -21,10 +21,10 @@
/* Enable jcrop plugin onto id cropbox */
jQuery(function() {
jQuery('#cropbox').Jcrop({
onSelect: updateCoords,
onChange: updateCoords
});
jQuery('#cropbox').Jcrop({
onSelect: updateCoords,
onChange: updateCoords
});
});
/* Update fields that store new size */

View File

@ -35,12 +35,12 @@
* @param string $urloption More parameters on URL request
* @param int $minLength Minimum number of chars to trigger that Ajax search
* @param int $autoselect Automatic selection if just one value
* @param array $ajaxoptions Multiple options array
* Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done
* Ex: array('disabled'=> )
* Ex: array('show'=> )
* Ex: array('update_textarea'=> )
* Ex: array('option_disabled'=> id to disable and warning to show if we select a disabled value (this is possible when using autocomplete ajax)
* @param array $ajaxoptions Multiple options array
* - Ex: array('update'=>array('field1','field2'...)) will reset field1 and field2 once select done
* - Ex: array('disabled'=> )
* - Ex: array('show'=> )
* - Ex: array('update_textarea'=> )
* - Ex: array('option_disabled'=> id to disable and warning to show if we select a disabled value (this is possible when using autocomplete ajax)
* @return string Script
*/
function ajax_autocompleter($selected, $htmlname, $url, $urloption='', $minLength=2, $autoselect=0, $ajaxoptions=array())
@ -622,4 +622,3 @@ function ajax_object_onoff($object, $code, $field, $text_on, $text_off, $input=a
return $out;
}

View File

@ -162,15 +162,15 @@ function convertTime2Seconds($iHours=0,$iMinutes=0,$iSeconds=0)
*
* @param int $iSecond Number of seconds
* @param string $format Output format ('all': total delay days hour:min like "2 days 12:30",
* 'allwithouthour': total delay days without hour part like "2 days",
* 'allhourmin': total delay with format hours:min like "60:30",
* 'allhour': total delay hours without min/sec like "60:30",
* 'fullhour': total delay hour decimal like "60.5" for 60:30,
* 'hour': only hours part "12",
* 'min': only minutes part "30",
* 'sec': only seconds part,
* 'month': only month part,
* 'year': only year part);
* - 'allwithouthour': total delay days without hour part like "2 days",
* - 'allhourmin': total delay with format hours:min like "60:30",
* - 'allhour': total delay hours without min/sec like "60:30",
* - 'fullhour': total delay hour decimal like "60.5" for 60:30,
* - 'hour': only hours part "12",
* - 'min': only minutes part "30",
* - 'sec': only seconds part,
* - 'month': only month part,
* - 'year': only year part);
* @param int $lengthOfDay Length of day (default 86400 seconds for 1 day, 28800 for 8 hour)
* @param int $lengthOfWeek Length of week (default 7)
* @return string Formated text of duration
@ -964,4 +964,3 @@ function monthArray($outputlangs,$short=0)
return $montharray;
}

View File

@ -253,19 +253,19 @@ function GETPOSTISSET($paramname)
* Use the property $user->default_values[path]['creatform'] and/or $user->default_values[path]['filters'] and/or $user->default_values[path]['sortorder']
* Note: The property $user->default_values is loaded by main.php when loading the user.
*
* @param string $paramname Name of parameter to found
* @param string $check Type of check
* ''=no check (deprecated)
* 'none'=no check (only for param that should have very rich content)
* 'int'=check it's numeric (integer or float)
* 'intcomma'=check it's integer+comma ('1,2,3,4...')
* 'alpha'=check it's text and sign
* 'aZ'=check it's a-z only
* 'aZ09'=check it's simple alpha string (recommended for keys)
* 'array'=check it's array
* 'san_alpha'=Use filter_var with FILTER_SANITIZE_STRING (do not use this for free text string)
* 'nohtml', 'alphanohtml'=check there is no html content
* 'custom'= custom filter specify $filter and $options)
* @param string $paramname Name of parameter to found
* @param string $check Type of check
* ''=no check (deprecated)
* 'none'=no check (only for param that should have very rich content)
* 'int'=check it's numeric (integer or float)
* 'intcomma'=check it's integer+comma ('1,2,3,4...')
* 'alpha'=check it's text and sign
* 'aZ'=check it's a-z only
* 'aZ09'=check it's simple alpha string (recommended for keys)
* 'array'=check it's array
* 'san_alpha'=Use filter_var with FILTER_SANITIZE_STRING (do not use this for free text string)
* 'nohtml', 'alphanohtml'=check there is no html content
* 'custom'= custom filter specify $filter and $options)
* @param int $method Type of method (0 = get then post, 1 = only get, 2 = only post, 3 = post then get, 4 = post then get then cookie)
* @param int $filter Filter to apply when $check is set to 'custom'. (See http://php.net/manual/en/filter.filters.php for détails)
* @param mixed $options Options to pass to filter_var when $check is set to 'custom'
@ -7174,11 +7174,11 @@ function dol_getmypid()
/**
* Generate natural SQL search string for a criteria (this criteria can be tested on one or several fields)
*
* @param string|string[] $fields String or array of strings, filled with the name of all fields in the SQL query we must check (combined with a OR). Example: array("p.field1","p.field2")
* @param string $value The value to look for.
* @param string|string[] $fields String or array of strings, filled with the name of all fields in the SQL query we must check (combined with a OR). Example: array("p.field1","p.field2")
* @param string $value The value to look for.
* If param $mode is 0, can contains several keywords separated with a space or |
* like "keyword1 keyword2" = We want record field like keyword1 AND field like keyword2
* or like "keyword1|keyword2" = We want record field like keyword1 OR field like keyword2
* like "keyword1 keyword2" = We want record field like keyword1 AND field like keyword2
* or like "keyword1|keyword2" = We want record field like keyword1 OR field like keyword2
* If param $mode is 1, can contains an operator <, > or = like "<10" or ">=100.5 < 1000"
* If param $mode is 2, can contains a list of int id separated by comma like "1,3,4"
* If param $mode is 3, can contains a list of string separated by comma like "a,b,c"

View File

@ -377,8 +377,8 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @param array $array_sql SQL requests to be executed when enabling module
* @param string $options String with options when disabling module:
* 'noboxes' = Do not insert boxes
* 'newboxdefonly' = For boxes, insert def of boxes only and not boxes activation
* - 'noboxes' = Do not insert boxes
* - 'newboxdefonly' = For boxes, insert def of boxes only and not boxes activation
*
* @return int 1 if OK, 0 if KO
*/
@ -468,7 +468,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
*
* @param string[] $array_sql SQL requests to be executed when module is disabled
* @param string $options Options when disabling module:
* 'newboxdefonly|noboxes' = We don't remove boxes.
* - 'newboxdefonly|noboxes' = We don't remove boxes.
*
* @return int 1 if OK, 0 if KO
*/

View File

@ -803,7 +803,7 @@ class ProductFournisseur extends Product
* @param int $showsuptitle Show "Supplier" into output string
* @param int $maxlen Max length of name
* @param integer $notooltip 1=Disable tooltip
* @param array $productFournList list of ProductFournisseur objects
* @param array $productFournList list of ProductFournisseur objects
* to display in table format.
* @return string String with supplier price
*/
@ -850,4 +850,3 @@ class ProductFournisseur extends Product
}
}

View File

@ -1653,7 +1653,7 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
* @param array $menu_array_before Table of menu entries to show before entries of menu handler. This param is deprectaed and must be provided to ''.
* @param string $helppagename Name of wiki page for help ('' by default).
* Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage
* For other external page: http://server/url
* For other external page: http://server/url
* @param string $notused Deprecated. Used in past to add content into left menu. Hooks can be used now.
* @param array $menu_array_after Table of menu entries to show after entries of menu handler
* @param int $leftmenuwithoutmainarea Must be set to 1. 0 by default for backward compatibility with old modules.

View File

@ -555,7 +555,7 @@ class Ticket extends CommonObject
* @param int $offset Offset for query
* @param int $arch archive or not (not used)
* @param array $filter Filter for query
* output
* output
* @return int <0 if KO, >0 if OK
*/
public function fetchAll($user, $sortorder = 'ASC', $sortfield = 't.datec', $limit = '', $offset = 0, $arch = '', $filter = '')
@ -1614,11 +1614,11 @@ class Ticket extends CommonObject
}
include_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
$mailfile = new CMailFile($subject, $info_sendto['email'], $from, $message, $filepath, $mimetype, $filename, $sendtocc, '', $deliveryreceipt, 0);
if ($mailfile->error || $mailfile->errors)
if ($mailfile->error || $mailfile->errors)
{
setEventMessages($mailfile->error, $mailfile->errors, 'errors');
}
else
}
else
{
$result = $mailfile->sendfile();
if ($result > 0) {