Skip to content

Commit

Permalink
https://github.com/mage2pro/core/issues/404
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Jun 3, 2024
1 parent a6b6d61 commit bcd0164
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/lib/array/clean/filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ function df_filter($a1, $a2):array {return df_filter_f($a1, $a2, 'array_filter')
* 2) We still can not use «Union Types» (e.g. `callable|iterable`) because they require PHP ≥ 8 (we need to support PHP ≥ 7.1):
* https://php.watch/versions/8.0/union-types
* https://3v4l.org/AOWmO
* 3) "Use the `callable` type": https://github.com/mage2pro/core/issues/404
* @used-by df_filter()
* @used-by df_filter_head()
* @used-by df_filter_tail()
* @param callable|iterable $a1
* @param callable|iterable $a2
* @param callable $fA
* @return array(int|string => mixed)
*/
function df_filter_f($a1, $a2, $fA):array {/** @var array $r */
function df_filter_f($a1, $a2, callable $fA):array {/** @var array $r */
# 2020-03-02, 2022-10-31
# 1) Symmetric array destructuring requires PHP ≥ 7.1:
# [$a, $b] = [1, 2];
Expand Down

0 comments on commit bcd0164

Please sign in to comment.