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

106 Commits

Author SHA1 Message Date
Matthew Brown
fa51c39902 Improve dead code analysis of switch statements 2018-06-16 21:54:44 -04:00
Matthew Brown
3670f066bb Improve dead code detection 2018-06-16 20:01:41 -04:00
Matt Brown
6873e60847 Optimise flow of if evaluation 2018-06-07 15:04:22 -04:00
Matthew Brown
a20bdaef45 Fix issue evaluating negated assertion 2018-06-03 20:24:23 -04:00
Matthew Brown
4ab15067de Speed up unnecessary else checks 2018-05-31 22:20:38 -04:00
Matt Brown
ef992612d9 Fix $_SERVER var reconciliation 2018-05-31 15:30:39 -04:00
Matthew Brown
df89c8d7f2 Fix variadic check for included file functions 2018-05-30 21:01:50 -04:00
Matthew Brown
33a38113f3 Fix isset check 2018-05-30 20:54:03 -04:00
Matt Brown
eb10b15cfc Improve reliability of elseif resolution 2018-05-30 18:56:44 -04:00
Matt Brown
4fb6bbf5ee Prevent clause size from ballooning 2018-05-30 13:57:45 -04:00
Matthew Brown
b0733254bb
Use individual type objects for each string (#757)
* Experiment with individual types for each string

* Fix bunch of errors

* Fix a few more issues

* Fix a whole bunch of bugs

* Fix most remaining bugs

* Fix isset warnings

* Fix psalm errors in psalm

* Limit big string size

* Fix falsiness of ints

* Fix issue with type widening, allowing value set in nested if to be altered

* Don’t complain if type is mixed

* Add skipped-for-now test

* Add specific test to address issue
2018-05-18 11:02:50 -04:00
Matt Brown
a0281e5716 Improve clause eradication after ifs 2018-05-14 16:29:51 -04:00
Matt Brown
02c72f6de5 Fix buggy if checks 2018-05-14 12:25:58 -04:00
Matthew Brown
dbc0e6dfcb Use arrays instead of strings for assertions 2018-05-12 19:38:43 -04:00
Matthew Brown
7dd86efa13 Add support for checking negative values 2018-05-12 18:46:47 -04:00
Matt Brown
f858924b60 Fix erroneous string matching after oring 2018-05-07 17:40:16 -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
04bd492360 Fix erroneous scope resolution 2018-05-05 20:52:10 -04:00
Matthew Brown
19ccdbc08b Remove unnecessary foreach 2018-04-24 21:15:33 -04:00
Matthew Brown
3e7e1b3020 Fix #694 - remove descendent vars when possibly reassigning 2018-04-24 21:02:07 -04:00
Matt Brown
f3b579b06a Fix #685 - ignore assignment in conditional 2018-04-19 11:58:51 -04:00
Matt Brown
6e6ae7aaa6 Only complain about redundant conditions when check_variables is true 2018-04-11 14:37:01 -04:00
Matt Brown
fe46e4e63d Make tests a bit more specific 2018-04-10 15:47:04 -04:00
Matthew Brown
f15c26d7f4 Change how type impossibilities are treated to improve message types 2018-04-10 01:27:26 -04:00
Matt Brown
e5e0c56abc Don’t remove clauses on mixed, just substitute for wedges 2018-03-15 16:40:22 -04:00
Tyson Andre
7aeacebba4 Fix possible typos in comments and issue messages 2018-02-19 15:35:13 -05:00
Matthew Brown
88ca7d2fa7 Fix #515 - make Psalm aware of variable array keys 2018-02-17 11:24:08 -05:00
Matt Brown
78cc1786c8 Don’t check newly-scoped vars in conditional 2018-02-08 14:46:06 -05:00
Matt Brown
7f4be858c2 Fix #498 - add better issue type for docblock contradiction 2018-02-07 15:20:47 -05:00
Matthew Brown
fb300baa6d Move a bunch of code into Codebase 2018-02-01 00:50:01 -05:00
Matthew Brown
44b8b22995 Improve checks for unused variables and params 2018-01-28 17:28:34 -05:00
Matthew Brown
ea28ee709d Improve unused variable detection slightly 2018-01-25 01:04:26 -05:00
Matthew Brown
e8487e86f0 Make sure else/elseif roots are at the if declaration 2018-01-21 22:05:57 -05:00
Matthew Brown
68b00ea49a Add automatic fix for PossiblyUndefinedVariable 2018-01-21 16:24:20 -05:00
Matthew Brown
799aef628e Fix type assignment checks 2018-01-20 11:48:16 -05:00
Scott
2bab66855b Specify delimiter in preg_quote
```
PHP Warning:  preg_match(): Unknown modifier 't' in /home/scott/project-redacted/vendor/vimeo/psalm/src/Psalm/Checker/Statements/Block/IfChecker.php on line 166
```
2018-01-17 18:15:13 -05:00
Matt Brown
a253ca68bc Allow array_filter to inspect closure bodies 2018-01-17 16:07:46 -05:00
Matthew Brown
fb9f20f4b8 Find unused properties with dead code checks
Fixes #424
2018-01-10 23:29:18 -05:00
Matthew Brown
c28b804633 Fix potential filtering of non-zero keys 2018-01-08 01:38:25 -05:00
Matthew Brown
8ababf1537 Allow assertions on mixed vars 2018-01-08 00:14:02 -05:00
Matthew Brown
bb41b92789 Filter forumulae to remove assertions on unknowable things 2018-01-07 23:59:25 -05:00
Matthew Brown
8a8253ac4c Fix indentation 2018-01-02 21:23:48 -05:00
Matt Brown
13931766ce Add PHP 7.2-compatibility for Psalm development 2018-01-02 19:55:07 -05:00
Matthew Brown
c38cf9b672 Migrate type reconciliation code to its own class 2017-12-29 10:55:53 -05:00
Matthew Brown
2011b8fb8f Remove dead code 2017-12-16 10:51:04 -05:00
Matthew Brown
a413e0496a Fix #361 by terminating analysis if loop statements have issues 2017-12-10 16:22:45 -05:00
Matt Brown
e2b1b24dbf Fix empty checks, make them more like isset checks
Fixes #372
2017-12-05 12:14:10 -05:00
Matthew Brown
7d003c5bc1 Fix erroneous treatment of or clauses in if statements 2017-12-03 16:25:52 -05:00
Matthew Brown
d20b8d3034
Improve loop analysis (#365) 2017-12-02 18:28:18 -05:00