Matthew Brown
b47d732993
Fix to support PHP Parser 4.0.2
2018-06-03 10:05:50 -04:00
Bruce Weirdan
6ecea35837
array_column return type inference ( #787 )
...
* Exception message typo fixed
* array_column return type inference
It takes a safe approach and only tries to be smart when array row type
is definite single shape
* cs fix
2018-05-31 21:14:06 -04:00
Matthew Brown
c8faaf0ca9
Remove unused vars
2018-05-23 21:27:01 -04:00
Matthew Brown
e61ba336be
Rewrite ifs as big switch
2018-05-23 21:17:14 -04:00
Matthew Brown
ea465852e1
Move TypeCombination logic into its own class
2018-05-19 19:44:03 -04:00
Matt Brown
f2a70fef85
Fix #745 - give iterator_to_array back its type info
2018-05-18 18:10:10 -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
dbc0e6dfcb
Use arrays instead of strings for assertions
2018-05-12 19:38:43 -04:00
Matthew Brown
b4c0ffbe9d
Also match substr_replace
2018-05-09 00:39:45 -04:00
Matthew Brown
8149573754
Treat str_ireplace like str_replace
2018-05-09 00:34:44 -04:00
Matthew Brown
21261172a8
Fix #713 - support offsets of known array types
2018-05-05 17:30:18 -04:00
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
acacde173e
Fix highlight_string return type default
2018-04-30 01:49:55 -04:00
Matthew Brown
6ad2184b7e
Improve highlight_string/highlight_file signatures
2018-04-30 00:31:27 -04:00
Matt Brown
6afaf5aae9
Make Psalm compatible with PHP Parser 4
2018-04-17 13:06:02 -04:00
Matt Brown
3cc549384f
Type explode more accurately
2018-04-16 16:03:04 -04:00
Matthew Brown
3fe9a0606e
Fix #654 - warn about MixedArgument when inferredType property does not exist
...
And handle str_replace more leniently when args unknown
2018-04-07 15:16:46 -04:00
Matt Brown
60c6bb4021
Fix #650 - be more judicious about inserting mixed into places
2018-04-06 18:28:22 -04:00
Matt Brown
c932ed7764
Fix #651 - allow Psalm to understand assertions on properties of array objects
2018-04-06 16:23:10 -04:00
Matthew Brown
4ff7db09f9
Fix var_export return type
...
Fixes #636
2018-04-02 22:19:58 -04:00
Matthew Brown
58115599a1
Add support for callable(...) syntax
...
Ref #580
2018-03-26 22:13:10 -04:00
Matthew Brown
8b102d891c
Allow intersection types in callable args
2018-03-18 20:29:41 -04:00
Matthew Brown
d0fc48cfaf
Remove unnecessary whitespace
2018-03-15 00:37:08 -04:00
Matt Brown
822d0a116e
Reflect all numeric types passed to abs
...
Fixes #576
2018-03-14 18:05:36 -04:00
Matt Brown
52b6a5cbde
Fix #571 - fix buggy handling of packed vars
2018-03-13 13:50:41 -04:00
Matthew Brown
a0be2e390a
Fix case of mapping function before analysis
2018-03-05 09:05:38 -05:00
Matt Brown
80864b1ce8
Don’t be concerned about unused params named $_
...
Fixes #540
2018-02-27 11:39:26 -05:00
Matt Brown
30c6aa5c68
Add missing spaces
2018-02-26 11:09:17 -05:00
Matt Brown
93b714d7c8
Fix #541 - make array_map on object-like more accurate
2018-02-26 11:01:30 -05:00
Matt Brown
9d165bee7b
Fix generic return type for array_map
...
Ref #541
2018-02-26 10:39:48 -05:00
Matt Brown
1df4c3d196
Add DocblockTypeContradiction to find possible issues with docblock types
...
Fixes #491
2018-02-06 18:44:53 -05:00
Matt Brown
fc58655963
Make logic more Psalm-compatible
2018-02-06 13:52:59 -05:00
Matthew Brown
8e0998e081
Break apart the Codebase class
2018-02-03 18:56:54 -05:00
Matthew Brown
fb300baa6d
Move a bunch of code into Codebase
2018-02-01 00:50:01 -05:00
Matt Brown
5e0a8c4339
Inherit correct self return type
2018-01-26 10:59:30 -05:00
Matt Brown
1a2d13ae32
Ignore falsable issues from core functions
2018-01-25 13:07:36 -05:00
Matthew Brown
ea28ee709d
Improve unused variable detection slightly
2018-01-25 01:04:26 -05:00
Matt Brown
f46cf729bb
Allow null checks against preg_replace and related
2018-01-24 17:07:03 -05:00
Matthew Brown
bc9761f6c9
Create Codebase out from ProjectChecker
2018-01-21 13:45:33 -05:00
Matthew Brown
92e43b8fa0
Add a few optimisations
2018-01-20 21:22:33 -05:00
Matt Brown
a253ca68bc
Allow array_filter to inspect closure bodies
2018-01-17 16:07:46 -05:00
Matt Brown
edde8930af
Speed up Psalm by caching result of Union::getId
2018-01-09 15:05:48 -05:00
Matthew Brown
8ababf1537
Allow assertions on mixed vars
2018-01-08 00:14:02 -05:00
Matthew Brown
8e4f8fabe3
Fix getenv calls
...
Fixes #386
2018-01-08 00:09:22 -05:00
Matthew Brown
6e7bab58c4
Be better about inherited core method arg types
2018-01-04 18:58:03 -05:00
Matthew Brown
5afe3b10fa
Scan compoer autoload files before any sweep of code
2018-01-01 11:47:03 -05:00
Matthew Brown
290cf396d4
Remove unnecessary suppression
2017-12-31 13:12:19 -05:00
Matthew Brown
f81642c1eb
Fix location of function param vars
2017-12-29 21:28:21 -05:00
Matthew Brown
e2e1094ec6
Fix #407 - improve treatment of array_merge unpacked args
2017-12-23 02:09:58 +01:00
Matthew Brown
17edb2bbe6
Add better understanding of arrays with keyed integer offsets ( #400 )
...
* Add tests for keyed integer assignemnt
* First pass to get keyed integer assignment working
* Fix array assignment to object-like with different key type
* Improve treatment of objectlikes for callable and iterable comparisons
* Fix array assignment to strings and addition
* Convert expression to CNF
* Do better at merging property types
* Fix array_rand key type
2017-12-18 18:47:17 -05:00