File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 4
4
5
5
- Enh #168 : Add benchmark, improve ` ArrayHelper::htmlEncode() ` performance (@samdark )
6
6
- Enh #169 : Bump ` yiisoft/strings ` dependency to ` ^2.6 ` (@vjik )
7
+ - Enh #171 : Improve psalm types in ` ArrayHelper::group() ` (@vjik )
7
8
8
9
## 3.2.0 February 01, 2025
9
10
Original file line number Diff line number Diff line change 33
33
},
34
34
"require-dev" : {
35
35
"bamarni/composer-bin-plugin" : " ^1.8.2" ,
36
- "phpunit/phpunit" : " ^10.5.45 " ,
37
- "rector/rector" : " ^2.0.9 " ,
36
+ "phpunit/phpunit" : " ^10.5.48 " ,
37
+ "rector/rector" : " ^2.1.2 " ,
38
38
"roave/infection-static-analysis-plugin" : " ^1.35" ,
39
39
"spatie/phpunit-watcher" : " ^1.24" ,
40
40
"vimeo/psalm" : " ^5.26.1 || ^6.5.1" ,
41
- "phpbench/phpbench" : " ^1.4"
41
+ "phpbench/phpbench" : " ^1.4.1 "
42
42
},
43
43
"autoload" : {
44
44
"psr-4" : {
52
52
},
53
53
"config" : {
54
54
"sort-packages" : true ,
55
- "bump-after-update" : " dev" ,
56
55
"allow-plugins" : {
57
56
"bamarni/composer-bin-plugin" : true ,
58
57
"infection/extension-installer" : true ,
Original file line number Diff line number Diff line change @@ -797,12 +797,15 @@ public static function index(
797
797
* @param Closure[]|string|string[] $groups The array of keys that will be used to group the input array
798
798
* by one or more keys.
799
799
*
800
- * @psalm-param iterable<mixed, array|object> $array
801
- *
802
800
* @return array The grouped array.
801
+ *
802
+ * @template T as array|object
803
+ * @psalm-param iterable<mixed, T> $array
804
+ * @psalm-return array<non-empty-list<T>>
803
805
*/
804
806
public static function group (iterable $ array , array |string $ groups ): array
805
807
{
808
+ /** @psalm-var array<non-empty-list<T>> */
806
809
return self ::index ($ array , null , $ groups );
807
810
}
808
811
You can’t perform that action at this time.
0 commit comments