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

7242 Commits

Author SHA1 Message Date
orklah
d32b1be5a3
Merge pull request #6498 from MorrisJobke/fix/catch-ComplicatedExpressionException-in-ArrayFilterReturnTypeProvider.php
Catch ComplicatedExpressionException in ArrayFilterReturnTypeProvider
2021-09-20 16:53:48 +02:00
orklah
55fd9c6713
Merge pull request #6478 from whsv26/bugfix/trait-template-invalid-arg
Fix invalid argument bug in generic trait context
2021-09-20 16:53:12 +02:00
orklah
994c927b6a
Merge pull request #6445 from TysonAndre/negate-in_array-v2
Fix false positive ParadoxicalCondition in negation of in_array
2021-09-20 16:49:15 +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
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
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
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
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
c3afe103c5 allow asserting positive int on an int range 2021-09-19 19:29:59 +02:00
orklah
4682c4be5e remove unnecessary var 2021-09-19 19:29:59 +02:00
orklah
86afff61c5 allow combining TIntRange with other ints 2021-09-19 19:29:59 +02:00
orklah
8325378e23 support inverted comparison and remove null after value comparison 2021-09-19 19:29:59 +02:00
orklah
ca4c18c30d put assertions back 2021-09-19 19:29:59 +02:00