forked from Wavyzz/dolibarr
Force type to fix PhanNonClassMethodCall
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2010-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -34,12 +35,12 @@ $linkedObjectBlock = $GLOBALS['linkedObjectBlock'];
|
||||
$langs->load("bills");
|
||||
|
||||
$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1);
|
||||
'@phan-var-force array<string,CommonObject> $linkedObjectBlock';
|
||||
|
||||
$total = 0;
|
||||
$ilink = 0;
|
||||
foreach ($linkedObjectBlock as $key => $objectlink) {
|
||||
$ilink++;
|
||||
|
||||
$trclass = 'oddeven';
|
||||
if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) {
|
||||
$trclass .= ' liste_sub_total';
|
||||
|
||||
@@ -9579,13 +9579,13 @@ function dol_htmloutput_errors($mesgstring = '', $mesgarray = array(), $keepembe
|
||||
* or descending output and uses optionally natural case insensitive sorting (which
|
||||
* can be optionally case sensitive as well).
|
||||
*
|
||||
* @param array $array Array to sort (array of array('key1'=>val1,'key2'=>val2,'key3'...) or array of objects)
|
||||
* @param array<string|int,mixed> $array Array to sort (array of array('key1'=>val1,'key2'=>val2,'key3'...) or array of objects)
|
||||
* @param string $index Key in array to use for sorting criteria
|
||||
* @param string $order Sort order ('asc' or 'desc')
|
||||
* @param int $natsort If values are strings (I said value not type): 0=Use alphabetical order, 1=use "natural" sort (natsort)
|
||||
* If values are numeric (I said value not type): 0=Use numeric order (even if type is string) so use a "natural" sort, 1=use "natural" sort too (same than 0), -1=Force alphabetical order
|
||||
* @param int $case_sensitive 1=sort is case sensitive, 0=not case sensitive
|
||||
* @param int $keepindex If 0 and index key of array to sort is a numeric, than index will be rewrote. If 1 or index key is not numeric, key for index is kept after sorting.
|
||||
* @param int $keepindex If 0 and index key of array to sort is a numeric, then index will be rewritten. If 1 or index key is not numeric, key for index is kept after sorting.
|
||||
* @return array Sorted array
|
||||
*/
|
||||
function dol_sort_array(&$array, $index, $order = 'asc', $natsort = 0, $case_sensitive = 0, $keepindex = 0)
|
||||
|
||||
Reference in New Issue
Block a user