1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00
Commit Graph

59 Commits

Author SHA1 Message Date
Brown
8751bf232b Improve handling of negated boolean operations 2019-04-12 11:26:33 -04:00
Brown
a9b8952ea2 Fix #1545 - improve handling of negated binary ops 2019-04-11 18:51:21 -04:00
Bruce Weirdan
9bdc9f774f More provider typing 2019-03-02 08:43:19 -05:00
Matthew Brown
22ec7e537c Fix #1208 - respect inheritance when combining in boolean operation
Also fixes issue reconciling inside trait
2019-01-18 10:08:16 -05:00
Matthew Brown
dfba6e0dec Fix #1181 - prevent allowed memory errors with large conditionals 2019-01-08 09:19:33 -05:00
Matthew Brown
fb83da94bd Exit early when encountering complicated conditionals 2019-01-08 09:02:41 -05:00
Brown
fb848d62e9 Add checks for if (count($a)) and if (count($a) [operator] [number]) 2018-12-19 16:15:19 -05:00
Matthew Brown
ea89a6ba29 Revert "First pass"
This reverts commit 9ed047234f.
2018-12-19 08:45:14 -05:00
Matthew Brown
9ed047234f First pass 2018-12-19 01:59:14 -05:00
Matthew Brown
47f5f309ad Remove support for get_class($a) === "somestring"
But it works with class constants
2018-11-28 23:59:43 -05:00
Matthew Brown
4688b25fd9 Move internal classes to own namespace 2018-11-12 11:20:59 -05:00
Matt Brown
3263b64301 Filter conditions better when encountering parent instanceof 2018-05-16 11:47:39 -04:00
Tyson Andre
9a9f6d1856 Make the string concatenation of two known values into a known value (#717)
* Make the string concatenation of two known values into a known value

address review comments

* Add vim temporary files to .gitignore
2018-05-08 19:11:18 -04:00
Matt Brown
0eda76b742 Fix strict reconciliation of bools 2018-05-07 18:09:40 -04:00
Matt Brown
3c9e42f884 Fix string assertion for ternaries 2018-05-07 17:52:18 -04:00
Matt Brown
f858924b60 Fix erroneous string matching after oring 2018-05-07 17:40:16 -04:00
Matt Brown
2299cecd23 Fix strict isset reconciliation 2018-05-07 17:15:27 -04:00
Matt Brown
6460d907f9 Improve array handling when offsets hard to define 2018-05-07 16:22:04 -04:00
Matt Brown
c0729a02cd Fix remaining issues with logic checks 2018-05-07 14:52:45 -04:00
Matt Brown
9d901db740 Add new array creation test with hard-to-key offsets 2018-05-07 14:34:25 -04:00
Matthew Brown
61aeea6375 Fix whole bunches of things 2018-05-07 01:26:06 -04:00
Matthew Brown
c31f787f7c Convert DNF conditions to CNF 2018-05-06 12:11:40 -04:00
Matthew Brown
00838d19b5 Fix #534 - fix bug in type simplification 2018-05-06 12:05:55 -04:00
Matthew Brown
04bd492360 Fix erroneous scope resolution 2018-05-05 20:52:10 -04:00
Matt Brown
f3b579b06a Fix #685 - ignore assignment in conditional 2018-04-19 11:58:51 -04:00
Matt Brown
5b7d190640 Emit RedundantCondition when asserting two variables can never be equal 2018-04-17 15:39:09 -04:00
Matt Brown
df5d369443 Fix #677 - handle get_class checks more accurately 2018-04-17 10:28:49 -04: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
2120d258a4 Fix formatting of return type adder 2018-01-11 15:50:58 -05:00
Matthew Brown
c9173c7da3 Add more specific issues for falsable/nullable invalid return types 2018-01-04 21:36:16 -05:00
Matthew Brown
4b0cee6142 Only complain about redundant conditions if there’s one negated clause 2017-12-18 00:47:36 -05:00
Matthew Brown
4ff26cdd8f Fix RedundantCondition complaint when examining CNF queries 2017-12-18 00:39:00 -05:00
Matthew Brown
d804a92a93 Add skipped test with non-CNF algebra 2017-12-18 00:06:23 -05:00
Matthew Brown
46feaaf1c6 Don’t run try/catch analysis twice 2017-12-10 20:21:21 -05:00
Matt Brown
eca7351472 Add return-level issues as well as function-level ones
Fixes #379
2017-12-07 15:50:25 -05:00
Matthew Brown
f27bd50abe
Add RedundantCondition issue, replacing FailedTypeResolution (#344)
* Group changes

* Don’t worry about vars defined before exiting

* Fix issues with vars defined in conditionals

* Add failing test

* Only add failed reconciliation flag if nothing could be salvaged

* Avoid notice when removing clauses

* Improve handling of loops

* Fix evaluation of binary op expressions

* Remove unset vars from outer context after loop

* Ignore RedundantCondition in some more configs
2017-11-28 00:46:41 -05:00
Matthew Brown
f136fc3296 Fix #305 by making test error message checks more accurate 2017-11-15 21:04:25 -05:00
Matthew Brown
a85cd1db8a Add support for get_class and get_type negation checks 2017-10-22 20:17:04 -04:00
Matthew Brown
c7d55bf6de Improve aseertion finding by digging deeper into trivial comparisons 2017-10-22 19:11:28 -04:00
Matt Brown
024bcbc371 Fix #239 - warn about bad brackets 2017-10-12 14:02:06 -04:00
Matthew Brown
deb489e82d Fix #232 - discard clauses when evaluating catch block 2017-10-10 23:09:19 -04:00
Matthew Brown
862d22e83c Fix #230 - invalidate root vars on $arr[]= assignment 2017-10-10 23:01:52 -04:00
Matthew Brown
b43c2d5f0c Fix #231 - add special case for === false checks 2017-10-10 22:36:33 -04:00
Matthew Brown
e4e6c2a6e6 Fix #201 - list/array assignment should invalidate clauses too 2017-08-18 23:14:38 -04:00
Matthew Brown
fbc6379275 Fix #202 - vars changed inside loops should invalidate clauses 2017-08-18 22:41:25 -04:00
Matt Brown
4b5a5ead74 Fix paradox detection for multiple clauses 2017-08-07 18:38:38 -04:00
Matthew Brown
d6909193ea Add additional formatting changes 2017-05-26 20:05:57 -04:00
Jon Ursenbach
11bc153deb Rewriting and streamlining every unit test with data providers. (#147)
* Rewriting and streamlining every unit test with data providers.

All unit tests have been rewritten into PHPUnit data providers
to reduce the amount of unnecessary code-reuse through out the
test suite.
2017-04-24 23:45:02 -04:00
Matthew Brown
ce5b35169b Treat empty & !empty as special straddling types 2017-04-02 19:06:18 -04:00
Matthew Brown
a8220ba4f1 Fix bug where empty string could confuse 2017-04-02 18:28:06 -04:00