Skip to content

Commit 4f55454

Browse files
authored
Merge pull request #167 from Kharhamel/array_multisort
removed array_multisort
2 parents 4ef3bb2 + 281d7e4 commit 4f55454

File tree

4 files changed

+1
-76
lines changed

4 files changed

+1
-76
lines changed

generated/array.php

Lines changed: 0 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -58,80 +58,6 @@ function array_flip(array $array): array
5858
}
5959

6060

61-
/**
62-
* array_multisort can be used to sort several
63-
* arrays at once, or a multi-dimensional array by one or more
64-
* dimensions.
65-
*
66-
* Associative (string) keys will be maintained, but numeric
67-
* keys will be re-indexed.
68-
*
69-
* @param array $array1 An array being sorted.
70-
* @param array|int $array1_sort_order The order used to sort the previous array argument. Either
71-
* SORT_ASC to sort ascendingly or SORT_DESC
72-
* to sort descendingly.
73-
*
74-
* This argument can be swapped with array1_sort_flags
75-
* or omitted entirely, in which case SORT_ASC is assumed.
76-
* @param array|int $array1_sort_flags Sort options for the previous array argument:
77-
*
78-
* Sorting type flags:
79-
*
80-
*
81-
* SORT_REGULAR - compare items normally
82-
* (don't change types)
83-
*
84-
*
85-
* SORT_NUMERIC - compare items numerically
86-
*
87-
*
88-
* SORT_STRING - compare items as strings
89-
*
90-
*
91-
*
92-
* SORT_LOCALE_STRING - compare items as
93-
* strings, based on the current locale. It uses the locale,
94-
* which can be changed using setlocale
95-
*
96-
*
97-
*
98-
*
99-
* SORT_NATURAL - compare items as strings
100-
* using "natural ordering" like natsort
101-
*
102-
*
103-
*
104-
*
105-
* SORT_FLAG_CASE - can be combined
106-
* (bitwise OR) with
107-
* SORT_STRING or
108-
* SORT_NATURAL to sort strings case-insensitively
109-
*
110-
*
111-
*
112-
*
113-
* This argument can be swapped with array1_sort_order
114-
* or omitted entirely, in which case SORT_REGULAR is assumed.
115-
* @param mixed $params More arrays, optionally followed by sort order and flags. Only elements
116-
* corresponding to equivalent elements in previous arrays are compared.
117-
* In other words, the sort is lexicographical.
118-
* @throws ArrayException
119-
*
120-
*/
121-
function array_multisort(array &$array1, $array1_sort_order = SORT_ASC, $array1_sort_flags = SORT_REGULAR, ...$params): void
122-
{
123-
error_clear_last();
124-
if ($params !== []) {
125-
$result = \array_multisort($array1, $array1_sort_order, $array1_sort_flags, ...$params);
126-
} else {
127-
$result = \array_multisort($array1, $array1_sort_order, $array1_sort_flags);
128-
}
129-
if ($result === false) {
130-
throw ArrayException::createFromPhpError();
131-
}
132-
}
133-
134-
13561
/**
13662
* array_replace_recursive replaces the values of
13763
* array1 with the same values from all the following

generated/functionsList.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
'apcu_sma_info',
2727
'array_combine',
2828
'array_flip',
29-
'array_multisort',
3029
'array_replace_recursive',
3130
'array_replace',
3231
'array_walk_recursive',

generator/config/ignoredFunctions.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@
1717
'readdir', //the documentation is false: the function return false at the end of the iteration
1818
'apcu_delete', //apcu_delete returns false when the $key does not exist in the cache store
1919
'filter_has_var', //this function is meant to return true or false
20+
'array_multisort', // this function si too buggy, see PR #113 on github
2021
];

rector-migrate.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ services:
2828
apcu_sma_info: 'Safe\apcu_sma_info'
2929
array_combine: 'Safe\array_combine'
3030
array_flip: 'Safe\array_flip'
31-
array_multisort: 'Safe\array_multisort'
3231
array_replace_recursive: 'Safe\array_replace_recursive'
3332
array_replace: 'Safe\array_replace'
3433
array_walk_recursive: 'Safe\array_walk_recursive'

0 commit comments

Comments
 (0)