function declaration

This commit is contained in:
Frédéric FRANCE
2018-08-15 17:34:35 +02:00
parent 7bb781eea8
commit 54a078149a
32 changed files with 315 additions and 234 deletions

View File

@@ -1167,7 +1167,8 @@ function get_next_value($db,$mask,$table,$field,$where='',$objsoc='',$date='',$m
return $numFinal;
}
function get_string_between($string, $start, $end){
function get_string_between($string, $start, $end)
{
$string = " ".$string;
$ini = strpos($string,$start);
if ($ini == 0) return "";
@@ -2197,7 +2198,8 @@ function colorStringToArray($stringcolor,$colorifnotfound=array(88,88,88))
* @param array $input Array of products
* @return array Array of combinations
*/
function cartesianArray(array $input) {
function cartesianArray(array $input)
{
// filter out empty values
$input = array_filter($input);
@@ -2305,8 +2307,9 @@ function getModuleDirForApiClass($module)
* @param $max int Between 0 and 255
* @return String
*/
function random_color_part($min=0,$max=255) {
return str_pad( dechex( mt_rand( $min, $max) ), 2, '0', STR_PAD_LEFT);
function random_color_part($min=0,$max=255)
{
return str_pad( dechex( mt_rand( $min, $max) ), 2, '0', STR_PAD_LEFT);
}
/*
@@ -2316,6 +2319,7 @@ function random_color_part($min=0,$max=255) {
* @param $max int Between 0 and 255
* @return String
*/
function random_color($min=0, $max=255) {
return random_color_part($min, $max) . random_color_part($min, $max) . random_color_part($min, $max);
function random_color($min=0, $max=255)
{
return random_color_part($min, $max) . random_color_part($min, $max) . random_color_part($min, $max);
}