1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-11 16:59:45 +01:00
Commit Graph

102 Commits

Author SHA1 Message Date
Matthew Brown
b36b50784d Fix #703 - prevent undefined param offset 2018-04-30 22:18:41 -04:00
Matt Brown
6e67030925 Fix #702 - prevent bad array to iterable cast 2018-04-30 13:17:09 -04:00
Matt Brown
1f3837d972 Fix #686 - allow undefined class inside class_exists call 2018-04-19 12:16:00 -04:00
Matt Brown
3cc549384f Type explode more accurately 2018-04-16 16:03:04 -04:00
Radosław Kowalewski
15c1a82d8c Few fixes to make tests pass on windows
* changed / to DIRECTORY_SEPARATOR in expected messages
* cahnged most occurences PHP_EOL to "\n" in tests and src
* added output buffering in test to avoid marking test as risky
2018-04-12 22:41:13 -04:00
Matt Brown
fe46e4e63d Make tests a bit more specific 2018-04-10 15:47:04 -04:00
Matt Brown
6eabdf326d Fix display of closure objects 2018-04-09 16:45:54 -04:00
Matthew Brown
0b95f1017e Fix issues with callmap callable types 2018-04-08 12:57:56 -04:00
Matthew Brown
3fe9a0606e Fix #654 - warn about MixedArgument when inferredType property does not exist
And handle str_replace more leniently when args unknown
2018-04-07 15:16:46 -04:00
Matt Brown
4927dfd337 Fix issue with InvalidArrayOffset from falsable 2018-04-05 13:57:01 -04:00
Matthew Brown
78d5adb17d Make key work with typed arrays 2018-04-05 00:21:14 -04:00
Matthew Brown
4ff7db09f9 Fix var_export return type
Fixes #636
2018-04-02 22:19:58 -04:00
Matthew Brown
c8c216edb2 Fix #610 - add slightly hacky check for multiple callmap options 2018-03-30 18:51:59 -04:00
Matthew Brown
3ef7073862 Add callmap updates from Phan 2018-03-27 01:05:37 -04:00
Matthew Brown
58115599a1 Add support for callable(...) syntax
Ref #580
2018-03-26 22:13:10 -04:00
Matthew Brown
0defe84e01 Allow use of $argv and $argc in function use statements 2018-03-18 17:11:14 -04:00
Matt Brown
d6e0708e88 Fix #577 - allow int in second param of strpos 2018-03-15 17:32:03 -04:00
Matt Brown
822d0a116e Reflect all numeric types passed to abs
Fixes #576
2018-03-14 18:05:36 -04:00
Matt Brown
56bdb924f5 Fix #563 - improve error message and ignore falsable issues for strtotime 2018-03-08 14:04:00 -05:00
Matt Brown
d8825701f5 Fix #556 - closure params with defaults can still accept extra 2018-03-05 10:29:19 -05:00
Matthew Brown
67cad2063d Fix #555 - fix function name mapping class 2018-03-05 09:01:24 -05:00
Matthew Brown
ee6a9b98fb Allow arrays to be called (ugh) 2018-03-02 00:49:53 -05:00
Matthew Brown
54cbee1265 Add TooManyArguments for closure test 2018-03-02 00:12:41 -05:00
Matthew Brown
cc19f50c04 Prevent missing classes from confounding callable arg checks 2018-03-01 23:43:52 -05:00
Matthew Brown
6660aa8a00 Fix #548 - check array_map/array_filter args for param matches 2018-03-01 23:33:21 -05:00
Matt Brown
9d165bee7b Fix generic return type for array_map
Ref #541
2018-02-26 10:39:48 -05:00
Matthew Brown
a6b54a3607 Fix #513 - make sure numeric is treated like a number 2018-02-15 19:50:50 -05:00
Matthew Brown
e862e4ddb1 Make all plugin methods static
cc @TysonAndre
2018-02-11 20:56:34 -05:00
Matthew Brown
217233472c Fix #457 - fix objectlike property isset check 2018-02-10 23:30:40 -05:00
Matt Brown
7f4be858c2 Fix #498 - add better issue type for docblock contradiction 2018-02-07 15:20:47 -05:00
Matt Brown
1df4c3d196 Add DocblockTypeContradiction to find possible issues with docblock types
Fixes #491
2018-02-06 18:44:53 -05:00
Matthew Brown
861d907845 Add more information to TooMany/TooFewArguments issues
Fixes #481
2018-02-02 11:26:55 -05:00
Matthew Brown
3482ee3b39 Split UntypedParam into MissingParamType and MissingClosureParamType 2018-01-28 20:03:47 -05:00
Matt Brown
1a2d13ae32 Ignore falsable issues from core functions 2018-01-25 13:07:36 -05:00
Matt Brown
543872f186 Allow @psalm-ignore-falsable-return annotation
Downgrades issues around use of current(), reset(), end() etc.
2018-01-24 18:52:58 -05:00
Matt Brown
f46cf729bb Allow null checks against preg_replace and related 2018-01-24 17:07:03 -05:00
Matthew Brown
c0a22d5f55 Increase CallChecker code coverage 2018-01-22 00:17:16 -05:00
Matthew Brown
9b6b03ff9f Create Config before ProjectChecker, and remove test-specific code from FileChecker 2018-01-21 10:22:04 -05:00
Matt Brown
4b4e09277c Fix #450 - add checks for duplicate array keys
And fix the embarassing errors in tests
2018-01-18 17:16:50 -05:00
Matt Brown
a253ca68bc Allow array_filter to inspect closure bodies 2018-01-17 16:07:46 -05:00
Matthew Brown
573260b16d Don’t warn about null array access if we’re ignoring null issues 2018-01-12 18:04:11 -05:00
Matt Brown
2120d258a4 Fix formatting of return type adder 2018-01-11 15:50:58 -05:00
Matthew Brown
8e4f8fabe3 Fix getenv calls
Fixes #386
2018-01-08 00:09:22 -05:00
Stéphane Bour
9b2cfdc669 fix: add preserve_keys on array_reverse function 2018-01-03 21:57:11 -05:00
Matthew Brown
84260c5edc Prohibit array pass by ref 2017-12-22 15:21:23 +01:00
Matthew Brown
17edb2bbe6
Add better understanding of arrays with keyed integer offsets (#400)
* Add tests for keyed integer assignemnt

* First pass to get keyed integer assignment working

* Fix array assignment to object-like with different key type

* Improve treatment of objectlikes for callable and iterable comparisons

* Fix array assignment to strings and addition

* Convert expression to CNF

* Do better at merging property types

* Fix array_rand key type
2017-12-18 18:47:17 -05:00
Matthew Brown
31ce716647 Widen empty array checks 2017-12-10 16:17:27 -05:00
Matthew Brown
a8a1489a8f Fix closure naming convention so it doesn’t confuse method id checks 2017-12-05 01:47:49 -05:00
Matthew Brown
ccc0583bf8 Fix issue with bad assign after array_pop/array_shift 2017-11-19 23:46:32 -05:00
Matthew Brown
75b6e21801 Fix #315 - improve checking of object-like arrays in function params 2017-11-19 13:05:35 -05:00