1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-14 02:07:37 +01:00
Commit Graph

77 Commits

Author SHA1 Message Date
hirokinoue
e7005245b8 add test case for implode() 2022-05-14 23:36:51 +09:00
hirokinoue
4bb5c38eb6 add test case for usort() 2022-04-29 00:52:37 +09:00
hirokinoue
139948e774 add test case for uksort() 2022-04-29 00:33:08 +09:00
hirokinoue
d4470cc99e add test case for uasort() 2022-04-29 00:18:27 +09:00
hirokinoue
c7b9e1eebb add test case for shuffle() 2022-04-28 23:18:39 +09:00
hirokinoue
db565f1d32 add test case for rsort() 2022-04-28 23:05:33 +09:00
hirokinoue
3a6ebbb8ff add test case for sort() 2022-04-24 01:00:38 +09:00
hirokinoue
63faa0c919 test the correct function 2022-04-24 00:54:58 +09:00
Mateusz Cholewka
cd1b155f53 test if the type of second argument is not uncertain 2022-03-07 14:10:03 +01:00
Mateusz Cholewka
70abbbee01 refactor array column test
add one more test when index key not exist in array
reorganise samples to keep all similar together
2022-03-06 15:45:22 +01:00
Mateusz Cholewka
d48965d929 add failing test 2022-03-06 14:09:07 +01:00
ElisDN
9f01c16ae9 Fix array_replace type 2022-01-25 15:22:50 +03:00
orklah
52ae26f143 fix test 2022-01-09 15:53:43 +01:00
orklah
65efab3a8d keep class-strings through array_merge 2022-01-09 15:48:58 +01:00
rarila
97e6511fab Set number of lines before and after namespace. 2021-12-15 04:58:32 +01:00
ralila
8fb2e0f885 Handle some partials 2021-12-04 21:55:53 +01:00
orklah
4755131585 more consistency 2021-10-20 07:32:04 +02:00
Aleksandr Zhuravlev
978d9ec774 Improve handling of positive ints by array_filter() 2021-10-16 20:47:22 +13:00
ElisDN
7b47063585 Add array typed tests 2021-10-15 14:30:20 +03:00
ElisDN
f26e9ae3b1 Add array replace tests 2021-10-15 14:30:20 +03:00
orklah
22fb4b5d19 add test 2021-10-07 11:04:51 +02:00
orklah
b9f14f8687 improve min/max inference, add a return type provider for rand, mt_rand and random_int 2021-10-02 09:53:58 +02:00
Bruce Weirdan
103b2b7244
Warn about array_walk_recursive over objects 2021-08-31 23:18:20 +03:00
Bruce Weirdan
b370ce92aa
Report RawObjectIteration when array_walk is used on objects 2021-08-20 01:43:49 +03:00
Justin
f7a2aaef6e
Update DateTime and DateTimeImmutable signatures
`DateTime::format` and `DateTimeImmutable::format` will always
return a string starting in PHP 8.0.
2021-07-03 04:29:54 -04:00
Bruce Weirdan
6db79be207
Keep generic part of shape on array_map return type
Fixes vimeo/psalm#6038
2021-07-03 06:33:37 +03:00
Ruslan Karimov
79b61c3b61 Added support for self & static keywords in array_reduce callables 2021-06-29 22:27:50 +05:00
Matt Brown
9dde8eed9d Add support for literal-int annotations as well 2021-06-14 23:24:09 -04:00
Matt Brown
3140654a44 Experiment with implode literal tracking 2021-06-14 16:03:37 -04:00
olsavmic
4fb2b65164
Fix ArrayFillReturnTypeProvider - consider second param (#5770)
Add test

Fix
2021-05-14 20:12:39 -04:00
orklah
72022139fa
improve array_splice inference (#5738) 2021-05-10 11:45:52 -04:00
AndrolGenhald
b859fba52d
Fix array spread false negative that crashes (fixes #5431, reverts #2852) (#5432) 2021-03-19 21:51:36 -04:00
AndrolGenhald
d4590711d6
Fix object-like array keys when combining string and automatic keys (fixes #5427). (#5428)
* Fix object-like array keys (fixes #5427).

* Fix incorrect return types for tests.

* Fix false positive list with literal int key.
2021-03-19 21:44:44 -04:00
orklah
1a3ff5676a
fix stub for array_combine + remove false in PHP8 + improve tests (#5395) 2021-03-16 13:43:49 -04:00
orklah
dd4d970a37
makes array_combine return non-empty-array for most cases (#5393)
* makes array_combine return non-empty-array for most cases

* Add back newline

Co-authored-by: Matthew Brown <github@muglug.com>
2021-03-14 21:18:19 -04:00
Matt Brown
876a772edc Fix #5176 - substitute in actual argument when instance type found 2021-02-08 09:29:41 -05:00
Matt Brown
0624098865 Ensure getId() output can always be parsed as a type
Ref #5105
2021-01-25 23:41:51 -05:00
Matt Brown
7ffea7c425 Fix #4917 - allow array_reduce to be called with a single arg 2021-01-06 12:59:51 -05:00
Matt Brown
b64eb6d716 Break out array_key_exists tests 2020-12-02 14:42:16 -05:00
orklah
32bf18dff0
fix array_column with possibly_undefined keys (#4719) 2020-11-27 17:05:54 -05:00
Matt Brown
f43dba8c4c Use more accurate comparison for non-empty-lists 2020-10-28 13:32:55 -04:00
Matt Brown
fee3b63122 Fix #4274 - don’t ignore mixed union in array_shift operation 2020-10-12 15:17:22 -04:00
orklah
7093253eea
fix test on windows (#4225) 2020-09-20 13:00:30 -04:00
Brown
72d1d799b1 Fix #4208 - array with possibly-undefined keys isn‘t really sealed 2020-09-19 15:46:54 -04:00
Brown
0b209864fe Improve accuracy of array_filter 2020-09-14 13:31:53 -04:00
Brown
8d7fe83e2a Improve array_merge return type 2020-09-14 13:06:15 -04:00
ygottschalk
5b0c9b1a28
added array-size max constraint to greater check (#4175)
added a few unit tests
2020-09-12 16:13:13 -04:00
Brown
09d22cb05c Fix #4169 - add appropriate bounds check 2020-09-12 11:33:26 -04:00
orklah
ead107fa9e
More return types (#4173)
* add native return types

* redundant phpdoc
2020-09-12 11:24:05 -04:00
Brown
92239add4d Add some backwards-incompatible changes for 4.x 2020-08-30 11:44:14 -04:00