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

25 Commits

Author SHA1 Message Date
Matthew Brown
1a4ddc7cdd
Support value types (#707)
* Add first idea

* Add initial count experiments

* Remove false positives

* Fix getId to support changes in conditionals

* Add better tests

* Strip types when not exists

* Fix array offsets

* More fixes

* Add class constant value types

* Clone constants everywhere

* Don’t complain unnecessarily

* Be more lenient with possibly invalid __sets

* Fix mixed issues

* Fix bug concerning orred string equality

* Remove unnecessary casts
2018-05-03 13:56:30 -04:00
Matthew Brown
ea28ee709d Improve unused variable detection slightly 2018-01-25 01:04:26 -05:00
Matthew Brown
68b00ea49a Add automatic fix for PossiblyUndefinedVariable 2018-01-21 16:24:20 -05:00
Matthew Brown
3b7c84f484 Detect instances where loop invariants are invalidated
Fixes #389
2017-12-17 10:58:03 -05:00
Matthew Brown
2a7b48ce5f Add support for infinite loops
Fixes #381
2017-12-06 23:46:41 -05:00
Matthew Brown
d20b8d3034
Improve loop analysis (#365) 2017-12-02 18:28:18 -05:00
Matthew Brown
888b5dae00 Move LoopChecker into its own file 2017-11-30 01:07:20 -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
c86e73ddb6 Always keep track of referenced var ids
which we can use for analysis elsewhere
2017-11-24 12:17:28 -05:00
Matthew Brown
22a716f4da Improve formatting of phpdocs 2017-05-26 20:16:18 -04:00
Matthew Brown
7532e32b9d Fixed spacing and use statement formatting 2017-05-19 00:48:26 -04:00
Matthew Brown
ce6ca58291 Fix #114 - add optional Hack-like checks calls 2017-04-14 21:32:14 -04:00
Matt Brown
7bcf7f13b1 Fix #137 - add for init in main scope 2017-04-11 17:43:46 -04:00
Matthew Brown
dcedd65215 Add check for paradoxical statements 2017-04-02 15:26:10 -04:00
Matthew Brown
9b41bc9b37 Add slower (but more accurate) loop checks 2017-03-14 20:14:25 -04:00
Matt Brown
3d2be3410e Infer loop types without @var comments 2017-03-13 18:06:56 -04:00
Matt Brown
fa63afc27d Change property name 2017-03-13 11:23:26 -04:00
Matthew Brown
cd5f727d2e Collect explicit references to classes/methods 2017-02-26 23:09:18 -05:00
Matthew Brown
a4323359d3 Fix ternary/which/for conditionals 2017-02-12 18:47:02 -05:00
Matthew Brown
d3abc0011d Fix #80 - add dead code checks via command line 2017-01-31 23:24:33 -05:00
Matthew Brown
7d912fc214 Remove vars when they’ve been changed 2017-01-30 22:26:41 -05:00
Matt Brown
a2750a92aa Evaluate loop part of for after body 2017-01-18 17:13:20 -05:00
Matthew Brown
17329015dc Discriminate between checking, visiting and analyzing in method names 2017-01-07 15:09:47 -05:00
Jon Ursenbach
27c2db1d1d PSR-2 2016-11-02 17:50:54 -04:00
Matthew Brown
f3f1ba1caa Break out block checkers 2016-10-22 17:35:59 -04:00