Matthew Brown
5860fcf59d
We can reason about ORed conditions in while loops now
2018-07-02 23:46:51 -04:00
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
9bbe437f22
Fix issue with initially undefined variable in isset
2018-06-01 10:52:26 -04:00
Matt Brown
eb10b15cfc
Improve reliability of elseif resolution
2018-05-30 18:56:44 -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
Matthew Brown
61aeea6375
Fix whole bunches of things
2018-05-07 01:26:06 -04:00
Matt Brown
6afaf5aae9
Make Psalm compatible with PHP Parser 4
2018-04-17 13:06:02 -04:00
Matt Brown
3cf5345728
Improve codebase mixed coverage calculation by ignoring initial loops
2018-04-13 17:26:07 -04:00
Matthew Brown
f56edd3c04
Fix issue found by better analysis
2018-02-17 11:21:45 -05:00
Matt Brown
7f4be858c2
Fix #498 - add better issue type for docblock contradiction
2018-02-07 15:20:47 -05:00
Matt Brown
685ea29ebe
Move asserted var creation after conditional reconciliation
2018-02-07 14:13:57 -05:00
Matthew Brown
970ceab396
Check loop context var exists
...
This can happen if the parent has been reassigned
2018-02-06 21:03:36 -05:00
Matt Brown
d88eadbb0e
Fix #486 - skip first reconciliation in loop checker for do stmts
2018-02-06 11:07:52 -05:00
Matt Brown
c7b2ae4e0e
Fix do while nullability issue
2018-01-29 17:18:03 -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
c38cf9b672
Migrate type reconciliation code to its own class
2017-12-29 10:55:53 -05:00
Matthew Brown
3b7c84f484
Detect instances where loop invariants are invalidated
...
Fixes #389
2017-12-17 10:58:03 -05:00
Matthew Brown
2011b8fb8f
Remove dead code
2017-12-16 10:51:04 -05:00
Matt Brown
8ca5fbefea
Invalidate clauses when assigning root vars
2017-12-15 17:34:21 -05:00
Matthew Brown
34c133d5d0
Add for post conditions to assignment map analysis
2017-12-13 22:04:37 -05:00
Matt Brown
51a2f12bbf
Only update inner loop vars that have changed given preconditions
2017-12-11 12:03:50 -05:00
Matt Brown
6c84fecce9
Always update the parent context from the loop context
...
Fixes #377
2017-12-06 19:20:24 -05:00
Matt Brown
98085b2267
Fix #371 - improve handling of do statements broken in loop refactor
2017-12-05 11:05:10 -05:00
Matthew Brown
8abd77c70f
Revert to from_docbblock status of outer loop
2017-12-04 00:13:46 -05:00
Matthew Brown
0134d7bf5c
Keep track of referenced loop vvars
2017-12-03 23:50:51 -05:00
Matthew Brown
cff7f35d00
Change __toString type conversions to more precise getId checks
2017-12-03 12:44:08 -05:00
Matthew Brown
9a83990053
Clear clauses made redundant by pre-loop assignments
2017-12-02 20:02:29 -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