mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Qual: PHPdoc for anonymous function
This commit is contained in:
@@ -1180,7 +1180,9 @@ function GETPOSTDATE($prefix, $hourTime = '', $gm = 'auto', $saverestore = '')
|
|||||||
$minute = intval($m[2]);
|
$minute = intval($m[2]);
|
||||||
$second = intval($m[3]);
|
$second = intval($m[3]);
|
||||||
} elseif ($hourTime === 'end') {
|
} elseif ($hourTime === 'end') {
|
||||||
$hour = 23; $minute = 59; $second = 59;
|
$hour = 23;
|
||||||
|
$minute = 59;
|
||||||
|
$second = 59;
|
||||||
} else {
|
} else {
|
||||||
$hour = $minute = $second = 0;
|
$hour = $minute = $second = 0;
|
||||||
}
|
}
|
||||||
@@ -11870,10 +11872,23 @@ function dolExplodeKeepIfQuotes($input)
|
|||||||
preg_match_all('/"([^"]*)"|\'([^\']*)\'|(\S+)/', $input, $matches);
|
preg_match_all('/"([^"]*)"|\'([^\']*)\'|(\S+)/', $input, $matches);
|
||||||
|
|
||||||
// Merge result and delete empty values
|
// Merge result and delete empty values
|
||||||
// @phan-suppress-next-line PhanPluginUnknownClosureParamType, PhanPluginUnknownClosureReturnType
|
return array_filter(array_map(
|
||||||
return array_filter(array_map(function ($a, $b, $c) {
|
/**
|
||||||
|
* Return first non-empty item, or empty string
|
||||||
|
*
|
||||||
|
* @param string $a Possibly empty item - match ""
|
||||||
|
* @param string $b Possibly empty item - match ''
|
||||||
|
* @param string $c Non empty string if $a and $b are empty
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
static function ($a, $b, $c) {
|
||||||
return $a ?: ($b ?: $c);
|
return $a ?: ($b ?: $c);
|
||||||
}, $matches[1], $matches[2], $matches[3]));
|
},
|
||||||
|
$matches[1],
|
||||||
|
$matches[2],
|
||||||
|
$matches[3]
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user