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
Matthew Brown
cfeb4c2586
Simplify vars_possibly_in_scope types
2017-12-02 13:32:20 -05:00
Matthew Brown
6c9d90850a
Don’t complain when there are duplicate clauses if due to an assignment
...
Fixes #356
2017-11-28 22:17:03 -05:00
Matt Brown
1173dcc6a2
Don’t stop reconciling types when encountering problem
2017-11-28 17:42:00 -05:00
Matt Brown
33f003f427
Don’t complain about repeat isset calls on array keys
...
Fixes #347
2017-11-28 16:52:52 -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
f16642dad2
Better switch analysis ( #343 )
...
* Experiment with good switch analysis
* Improve switch accuracy at expense of some processor cycles
* Evaluate switch case expression in case context
2017-11-28 00:25:21 -05:00
Matthew Brown
18cf05e087
Always keep track of assigned var ids
2017-11-25 11:21:45 -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
fd3de443b2
Update loop with union of existing types
2017-11-21 22:13:46 -05:00
Matthew Brown
ae799da8d0
Add root array var when updating array key type in if
2017-11-19 23:25:14 -05:00
Tyson Andre
b3505cfbef
Get rid of unused variables in psalm's codebase ( #272 )
...
* Remove unused variables
* Fix more unused variables
* Fix remaining detected undefined variables
Other 20 detected undefined variable warnings were false positives.
2017-11-08 23:14:27 -05:00
Matthew Brown
73694ab04e
Suggest types when complaining of untype params
...
Ref #204
2017-09-02 18:15:52 -04:00
Matthew Brown
4175295113
Isolate where we load static storage objects ( #195 )
...
* Move FileChecker::$storage calls to provider
* Add ClassLikeStorageProvider
* Use ClassLikeStorageProvider everywhere
* Move storage arrays into providers
2017-07-29 15:05:06 -04:00
Matthew Brown
bc35f88859
Fix issue with $this instanceof checks in traits
2017-06-23 00:39:37 -04:00
Matt Brown
f49d167a49
Add tracking from where a trait was included
2017-06-21 14:22:52 -04: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
Jon Ursenbach
f65c618b2e
PSR-2 adjustments and adding PHPCS checks into the Travis config. ( #149 )
...
* PSR-2 adjustments and adding PHPCS checks into the Travis config.
* Reverting some CallChecker changes and no longer casting vars to null.
2017-04-28 00:31:55 -04:00
Matthew Brown
dcedd65215
Add check for paradoxical statements
2017-04-02 15:26:10 -04:00
Matthew Brown
83edf8c4db
Complete the circle – fix remaining type algebra issue
2017-04-01 19:04:49 -04:00
Matthew Brown
2d88e237f4
Make method non-static
2017-03-19 13:23:19 -04:00
Matthew Brown
cb2ed860fb
Make sure to invalidate clauses in all parent contexts when asserting
2017-03-18 15:24:14 -04:00
Matthew Brown
3452c7853f
Add support for capturing clauses from elseifs
2017-03-18 14:04:26 -04:00
Matthew Brown
c33e66813a
Move type algebra functionality to separate checker
2017-03-18 13:37:00 -04:00
Matt Brown
30e8e1880d
Add another easy calculation of clauses
2017-03-16 14:45:45 -04:00
Matt Brown
cecfe25df7
Update outer clauses in mic drop situation
2017-03-16 11:46:07 -04:00
Matthew Brown
6cfe540c98
Fix issue evaluating elseif empty assertions
2017-03-14 15:48:52 -04:00
Matthew Brown
9dd94d099f
Fix issue with possibly-redefined switch vars
2017-03-14 02:00:38 -04:00
Matt Brown
3d2be3410e
Infer loop types without @var comments
2017-03-13 18:06:56 -04:00
Matthew Brown
a7da88bad3
Improve solution to allow for more user errors
2017-03-11 12:32:27 -05:00
Matthew Brown
cd5f727d2e
Collect explicit references to classes/methods
2017-02-26 23:09:18 -05:00
Matthew Brown
fa3b292fd4
Fix #101 - restrict the values of pass-by-ref variables
2017-02-23 00:25:28 -05:00
Matthew Brown
7cd1b27ff1
Add more support for logical and/or
2017-02-16 21:00:45 -05:00
Matthew Brown
81e24de76f
Fix invalid NullPropertyFetch warning
2017-02-12 18:06:18 -05:00
Matt Brown
32d85e20da
Remove unused vars
2017-02-10 19:10:13 -05:00
Matthew Brown
0fbf8b5619
Remove more dead code
2017-02-02 00:45:23 -05:00
Matthew Brown
d3abc0011d
Fix #80 - add dead code checks via command line
2017-01-31 23:24:33 -05:00
Matthew Brown
965a79251d
Fix #82 by updating how isset calls are handled
2017-01-31 00:34:06 -05:00
Matthew Brown
17329015dc
Discriminate between checking, visiting and analyzing in method names
2017-01-07 15:09:47 -05:00
Matthew Brown
694da2cabd
Simplify a lot of APIs
2017-01-07 14:35:07 -05:00
Matthew Brown
7609ca02c0
Fix #32 by evaluating all class references in files lazily
2017-01-04 23:42:58 -05:00
Matthew Brown
b6455a2566
Improve how we disable clauses
2016-12-28 18:55:16 -05:00
Matthew Brown
63a75108f5
Evaluate more expressions up front
2016-12-28 17:04:03 -05:00
Matthew Brown
797875ba9a
Fix #10 - allow negated assignments
2016-12-28 16:29:50 -05:00
Matthew Brown
6972c45c14
Remove vars from parent clauses when they are reconciled with vars
2016-12-28 14:20:16 -05:00