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

255 Commits

Author SHA1 Message Date
Brown
111303d913 Add non-empty-lowercase-string type 2020-05-15 10:18:05 -04:00
Brown
291018034b Remove unnecessary PHP code 2020-05-11 11:36:50 -04:00
Fabien Villepinte
5087feff79
Fix #2845 - FunctionReturnTypeProvider for sscanf (#3233)
Co-authored-by: Fabien Villepinte <fabien.villepinte@displayce.com>
2020-04-26 17:36:44 -04:00
still-dreaming-1
16fa208a60
Made compact's return array key type more specific (#3209) 2020-04-21 20:18:11 -04:00
Brown
2e4aaac5bb Add better inference for date calls 2020-04-14 21:07:44 -04:00
Brown
fea1310d67 Fix #3092 - round always returns a float 2020-04-09 23:31:26 -04:00
Brown
69045daea9 Convert a bunch of custom-handled functions to conditional stubbed ones 2020-04-07 16:48:29 -04:00
Brown
40345dd29c Remove json_encode test that no longer works 2020-04-04 18:02:28 -04:00
Brown
1bf1a6e46b Accept partial match of template type 2020-04-04 17:14:33 -04:00
Brown
1b01d7b356 Fix tests 2020-04-04 11:51:24 -04:00
Pavel Batečko
48af534270
Improve parse_url() return type (#2955) 2020-03-18 15:17:24 -04:00
Matthew Brown
0022de1f13 Fix #946 - allow too many arguments when one of union agrees 2020-03-15 13:44:00 -04:00
Brown
3c416482ec Fix #2932 - don’t crash when trying to expand callable object-like array 2020-03-09 10:56:37 -04:00
Thomas Gerbet
b40403d7b0 \sodium_memzero() sets to null the value of the given reference
While it is not mentionned in PHP manual \sodium_memzero() always sets
the given parameter to null [0].

[0] cb933d63c2/ext/sodium/libsodium.c (L512)
2020-03-03 19:34:20 -05:00
Matthew Brown
9bdca3c706 Forbid array<mixed, ...> 2020-02-21 01:26:51 -05:00
Brown
3d6c63bc08 Break apart FunctionCallTest 2020-01-31 13:58:02 -05:00
Matthew Brown
ce0298acc4 Fix #2704 - array_merge should ignore possibly-false issues where applicable 2020-01-29 21:09:33 -05:00
Matthew Brown
10221f474f Fix test 2020-01-27 23:52:06 -05:00
Matthew Brown
82bb3b90f0 Add @return to test 2020-01-27 23:38:31 -05:00
Brown
faf6afdce8 Support call_user_func evaluation
Fixes #726
2020-01-24 13:34:50 -05:00
Matthew Brown
24e1d5446c Fix #2642 - merging two explicit lists is still a list 2020-01-17 09:31:08 -05:00
Brown
1b551b805b Fix #2627 - infer arrow function effects for array_filter 2020-01-15 11:40:49 -05:00
Brown
eb7c3dcc11 Fix #2611 - fix combination of inferred closure return types 2020-01-13 10:23:58 -05:00
Matthew Brown
bd846123ce Fix #2560 - handle special case of array_filter on single-element array 2020-01-11 11:54:29 -05:00
Matthew Brown
40406c7ff0 Fix #2576 - remove literal key values if array_filter has no args 2020-01-11 11:48:22 -05:00
Pavel Batečko
702ca34c41 Improve array function types (#2566)
* Improve sorting function out types

* Improve return types of array_diff_assoc(), array_intersect_assoc()

* Fix versionCompareAsCallable test
2020-01-07 11:40:23 -05:00
Bruce Weirdan
7d3dd47efa Added support for preg_grep (#2523) 2019-12-29 11:05:08 -05:00
Valentin Udaltsov
006f788d6a Added array_fill_keys support (#2512)
* Added array_fill_keys support

* Removed unnecessary array_fill_keys phpdoc
2019-12-27 13:30:42 +00:00
Matthew Brown
456aa1c569 Fix #2468 - add support for zipping arrays 2019-12-18 18:14:02 +00:00
Matthew Brown
1d0ac3df29 Fix #2472 - array_map should retain non-emptiness when passed string callables 2019-12-15 14:06:12 -05:00
Matthew Brown
432c291dd7 Fix #2440 - add support for uasort 2019-12-08 21:30:19 -05:00
Valentin Udaltsov
4a742f9940 Added array_key_first and array_key_last stubs (#2381) 2019-11-27 10:59:12 -05:00
Matthew Brown
113bf921f6 Add support for arrow function inference 2019-11-27 10:12:59 -05:00
Pavel Batečko
4e594e0a65 Improve array function list handling (#2377)
* array_column() returns a list unless the 3rd arg is passed

* array_pad() return type provider

* array_chunk() return type provider

* array_map() preserve list types
2019-11-26 14:48:49 -05:00
Brown
5e17a9af10 Fix #2348 - ensure all functions and methods return some type 2019-11-14 14:44:29 -05:00
Joram Schrijver
c97ba8f713 Implement type-checking and forbidding for print (#2314)
* Add type-checking for print

* Allow print to be forbidden
2019-11-08 07:01:34 -05:00
Brown
e7330afe8b Fix #2295 - support special case of array_shift on known offset type 2019-11-04 09:21:13 -05:00
Pavel Batečko
b229ac875d Improve return types of explode() with limit (#2286) 2019-11-02 10:10:38 +01:00
Matthew Brown
05ace25817 Fix #2246 - fix return type of array_slice to be a list 2019-10-20 16:19:01 -04:00
Matthew Brown
b476761109 Fix #2235 - improve behaviour of array_merge on lists 2019-10-20 15:47:00 -04:00
lhchavez
216f991b0c Normalize stringified type names (#2239)
This change makes stringified types more normalized. Concretely it sorts
all union types, reconciled types, and sorts the keys within object-like
types.
2019-10-17 01:14:33 -04:00
Matthew Brown
1a1b3a10a9 Fix #2225 - iterator_to_array can return a list 2019-10-10 23:47:11 -04:00
Brown
ead2e38985 fix test 2019-10-09 13:51:25 -04:00
Matthew Brown
6a07757b9a Fix tests 2019-10-08 22:41:23 -04:00
Brown
16c33d1565 Add support for list type
Fixes #2209
2019-10-08 18:44:46 -04:00
Guuzen
50df2868f2 Fix issue #2201 (#2212) 2019-10-06 15:28:41 -04:00
Jay Klehr
27961045a0 allowing null as type for mysqli real_connect for host and passwd parameters (#2210) 2019-10-04 13:07:28 -04:00
Matthew Brown
2ffdf1bacc Fix undefined numeric offset 2019-10-01 08:45:36 -04:00
Matthew Brown
d387a1966c Fix array_slice return type 2019-09-21 15:50:37 -04:00
Brown
944531b73b fix #2125 - Don’t assume function args are necessarily authoratative 2019-09-11 13:52:58 -04:00