Ajout d'une étape de linting dans DroneCi (#3)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Corrige un doublons laissé par le rebase semi-manuel Ajout d'une étape de linting dans DroneCi Fix linting Co-authored-by: Nigel Sheldon <nigelsheldon@live.fr> Reviewed-on: https://gitea.nemunai.re/halo-battle/game/pulls/3
This commit is contained in:
parent
5b17a7dbd7
commit
dd61d3b66b
263 changed files with 45327 additions and 42695 deletions
|
|
@ -29,28 +29,28 @@ function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
|
|||
);
|
||||
|
||||
switch (gettype($var)) {
|
||||
case 'array' :
|
||||
case 'array':
|
||||
$results = '<b>Array (' . count($var) . ')</b>';
|
||||
foreach ($var as $curr_key => $curr_val) {
|
||||
$results .= '<br>' . str_repeat(' ', $depth * 2)
|
||||
. '<b>' . strtr($curr_key, $_replace) . '</b> => '
|
||||
. smarty_modifier_debug_print_var($curr_val, ++$depth, $length);
|
||||
$depth--;
|
||||
$depth--;
|
||||
}
|
||||
break;
|
||||
case 'object' :
|
||||
case 'object':
|
||||
$object_vars = get_object_vars($var);
|
||||
$results = '<b>' . get_class($var) . ' Object (' . count($object_vars) . ')</b>';
|
||||
foreach ($object_vars as $curr_key => $curr_val) {
|
||||
$results .= '<br>' . str_repeat(' ', $depth * 2)
|
||||
. '<b> ->' . strtr($curr_key, $_replace) . '</b> = '
|
||||
. smarty_modifier_debug_print_var($curr_val, ++$depth, $length);
|
||||
$depth--;
|
||||
$depth--;
|
||||
}
|
||||
break;
|
||||
case 'boolean' :
|
||||
case 'NULL' :
|
||||
case 'resource' :
|
||||
case 'boolean':
|
||||
case 'NULL':
|
||||
case 'resource':
|
||||
if (true === $var) {
|
||||
$results = 'true';
|
||||
} elseif (false === $var) {
|
||||
|
|
@ -62,21 +62,21 @@ function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
|
|||
}
|
||||
$results = '<i>' . $results . '</i>';
|
||||
break;
|
||||
case 'integer' :
|
||||
case 'float' :
|
||||
case 'integer':
|
||||
case 'float':
|
||||
$results = htmlspecialchars((string) $var);
|
||||
break;
|
||||
case 'string' :
|
||||
case 'string':
|
||||
$results = strtr($var, $_replace);
|
||||
if (strlen($var) > $length ) {
|
||||
if (strlen($var) > $length) {
|
||||
$results = substr($var, 0, $length - 3) . '...';
|
||||
}
|
||||
$results = htmlspecialchars('"' . $results . '"');
|
||||
break;
|
||||
case 'unknown type' :
|
||||
default :
|
||||
case 'unknown type':
|
||||
default:
|
||||
$results = strtr((string) $var, $_replace);
|
||||
if (strlen($results) > $length ) {
|
||||
if (strlen($results) > $length) {
|
||||
$results = substr($results, 0, $length - 3) . '...';
|
||||
}
|
||||
$results = htmlspecialchars($results);
|
||||
|
|
@ -86,5 +86,3 @@ function smarty_modifier_debug_print_var($var, $depth = 0, $length = 40)
|
|||
}
|
||||
|
||||
/* vim: set expandtab: */
|
||||
|
||||
?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue