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

9169 Commits

Author SHA1 Message Date
orklah
6bb952dc37 limit PHPParser to 4.12 2021-09-20 15:31:19 +02:00
Thomas
ecb368ff2b
Merge branch 'vimeo:master' into master 2021-09-20 12:19:43 +02:00
Thomas Bley
449ef0d994 fixed Uncaught Error: Call to undefined function shell_exec() 2021-09-20 12:18:49 +02:00
orklah
90e1662964
Merge pull request #6241 from orklah/range5
Range arithmetics and assertions
2021-09-20 07:15:43 +02:00
orklah
0f17a2590c fix Mod 2021-09-19 19:30:03 +02:00
orklah
25f78b5d54 refine Mod with positives everywhere 2021-09-19 19:30:03 +02:00
orklah
f87bd56105 fix Pow 2021-09-19 19:30:03 +02:00
orklah
5a2df475ca changes after review 2021-09-19 19:30:03 +02:00
orklah
81e8bf3ff5 allow Literals to be combined with preexisting IntRange 2021-09-19 19:30:03 +02:00
orklah
086d3777eb fix wrong assertion 2021-09-19 19:30:03 +02:00
orklah
3d7dc740c2 fix UnaryMinus 2021-09-19 19:30:03 +02:00
orklah
e75e390449 refactor big methods away 2021-09-19 19:30:03 +02:00
orklah
6b5e6eeecc fix wrong type 2021-09-19 19:30:02 +02:00
orklah
a6630c49a2 fix mod calculation with ranges 2021-09-19 19:30:02 +02:00
orklah
dd9edb7afc fix wrong check for Range validity 2021-09-19 19:30:02 +02:00
orklah
c226285a4b fix Mul and Pow operations 2021-09-19 19:30:02 +02:00
orklah
a8a659895f add failing test 2021-09-19 19:30:02 +02:00
orklah
f789ab0655 add test and allow checking in already inferred types instead of just relying on statements from PHPParser for assertions 2021-09-19 19:30:02 +02:00
orklah
ae0586b0e6 fix shift inference 2021-09-19 19:30:02 +02:00
orklah
bae5b2cf96 remove type when assertion contradicts the current type 2021-09-19 19:30:02 +02:00
orklah
e0e34bec33 allow intersections and add test 2021-09-19 19:30:02 +02:00
orklah
c26f403e7e fix an old bug with inverting positive int + allow inverting TIntRange 2021-09-19 19:30:02 +02:00
orklah
488c13b7c5 handle bit operations and add test 2021-09-19 19:30:02 +02:00
orklah
9994a91915 help Psalm understand the types 2021-09-19 19:30:02 +02:00
orklah
6f050359ce refactor int vs int range arithmetic by converting everything to range and add tests 2021-09-19 19:30:02 +02:00
orklah
4e9abcdf53 regenerate baseline 2021-09-19 19:30:02 +02:00
orklah
0227894176 fix code 2021-09-19 19:30:02 +02:00
orklah
d2f73d3adb fix and test minus case 2021-09-19 19:30:01 +02:00
orklah
d919a53674 rename method too 2021-09-19 19:30:01 +02:00
orklah
9ab46ff3e0 rename class because it handles Div too now 2021-09-19 19:30:01 +02:00
orklah
2dd16f9e22 simplify code 2021-09-19 19:30:01 +02:00
orklah
def7d31566 fix positive-numeric assertion 2021-09-19 19:30:01 +02:00
orklah
6d059b9c8f fix CS 2021-09-19 19:30:01 +02:00
orklah
b5b2677ee3 allow negating inferiorto/superiorto 2021-09-19 19:30:01 +02:00
orklah
b3a62c76dd add tests and use getNewHighestBound at one place 2021-09-19 19:30:01 +02:00
orklah
c20c1b5002 better div and modulo inference 2021-09-19 19:30:01 +02:00
orklah
05fb0c326d fix CS 2021-09-19 19:30:01 +02:00
orklah
3ad60cfdb9 Allow combining and improve comparison 2021-09-19 19:30:00 +02:00
orklah
e10b0fc3e9 use TIntRange in isAlwaysTruthy 2021-09-19 19:30:00 +02:00
orklah
edff17134d improve test 2021-09-19 19:30:00 +02:00
orklah
55b45853de try not to remove null after a positive-numeric assertion 2021-09-19 19:30:00 +02:00
orklah
219e425894 handle nightmare isset assertions 2021-09-19 19:30:00 +02:00
orklah
7d6ede61fd fix test 2021-09-19 19:30:00 +02:00
orklah
ee75586fbf expand test and fix assertions 2021-09-19 19:30:00 +02:00
orklah
d2e1388473 Allow inferior-to and superior-to even with negated numbers 2021-09-19 19:30:00 +02:00
orklah
21ceaa7dc7 reconcile positive-int with superior/inferior to 2021-09-19 19:30:00 +02:00
orklah
61d1d1660d handle the div case when even if min/max are integers, there may be float between them 2021-09-19 19:30:00 +02:00
orklah
168b1d8f0f fix wrong check with contains 2021-09-19 19:30:00 +02:00
orklah
9505411738 remove type by key instead of targetting global int 2021-09-19 19:30:00 +02:00
orklah
d9d9fa67a6 remove faulty test 2021-09-19 19:29:59 +02:00