1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 09:47:29 +01:00
Commit Graph

1542 Commits

Author SHA1 Message Date
Matthew Brown
3805893c5a Improve error messages for literal types 2018-05-20 17:43:02 -04:00
Matthew Brown
6250c2a14c Fix #16 - add support for enums 2018-05-20 17:19:53 -04:00
Matthew Brown
a3e2b98f7c Fix #743 - put InvalidArgument messages before PossiblyFalseArgument 2018-05-20 13:14:31 -04:00
Matthew Brown
cdcba6152d Add ability to infer return type for method calls 2018-05-20 12:47:26 -04:00
Matthew Brown
5bd9ba6207 Make TClassString inherit from TLiteralString 2018-05-20 00:27:53 -04:00
Matthew Brown
34a39b895c Support checks for array emptiness 2018-05-19 20:31:48 -04:00
Matthew Brown
ea465852e1 Move TypeCombination logic into its own class 2018-05-19 19:44:03 -04:00
Matthew Brown
09eb316a9c Fix #755 - add support for inferring explicit true checks 2018-05-19 00:41:07 -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
ec381308dd Fix #753 - prevent some strings from becoming literals 2018-05-17 01:46:01 -04:00
Matt Brown
3119a1f68a Allow resolution of class constants in const arrays 2018-05-14 17:39:08 -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
af8705502e Improve impossible case location reporting 2018-05-13 22:31:45 -04:00
Matthew Brown
557c3ddace Limit to the case condition 2018-05-13 22:25:08 -04:00
Matthew Brown
05c3d1ab03 Improve reporting of duplicate case statements 2018-05-13 22:02:10 -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
Matthew Brown
759516d01f Fall back to $method_id if no defining method id found 2018-05-12 13:19:19 -04:00
Matthew Brown
313a010355 Add workaround for Closure::__invoke 2018-05-12 13:02:53 -04:00
Matthew Brown
4fe5ac87b6 Fix #712 - rewrite switch statement fallthroughs to understand logic better 2018-05-12 12:55:24 -04:00
Matthew Brown
8de8ce2ef4 Only assign new offset types when it’s safe to do so 2018-05-12 11:19:31 -04:00
Matthew Brown
5589aa89be Fix #736 - only remove offset type when it doesn’t contain const array type 2018-05-12 11:17:41 -04:00
Matthew Brown
56a1f744a0 Fix #734 - allow DOMDocument::appendChild to mirror its first arg 2018-05-12 00:28:21 -04:00
Matthew Brown
1b8fd75a77 Suppress possibly-invalid key issue 2018-05-11 23:24:50 -04:00
Matthew Brown
b9b2a909a1 Fix #729 and prevent impossible const array access 2018-05-11 23:14:44 -04:00
Matt Brown
5c0f4a999c Move a bunch of classes to better places 2018-05-11 18:35:02 -04:00
Matt Brown
ef519ade72 Don’t adjust vars unless they’re passed by ref 2018-05-11 18:09:11 -04:00
Matthew Brown
a33d52d935 Add support for referencedProperty error restrictions 2018-05-11 00:07:41 -04:00
Matt Brown
92bb22ccca Fix misfire with similarly named class constants 2018-05-10 14:12:50 -04:00
Matt Brown
444dd33118 Fix issue with undefined class constant keys 2018-05-10 13:01:55 -04:00
Matt Brown
ad94761e15 Fix undefined property fetch redundant condition 2018-05-09 12:54:31 -04:00
Matthew Brown
318220a1bf Fix #728 - remove statement return type when re-analysing 2018-05-09 09:30:23 -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
77d4629896 Fix #714 - fix trait class constants 2018-05-08 22:32:57 -04:00
Matthew Brown
8f9b4098bc Allow scalar to work with false
Fixes #718
2018-05-08 22:18:58 -04:00
Matthew Brown
2c0dd36035 Fix get type return types 2018-05-08 22:01:05 -04:00
Matthew Brown
5c39fb5ab1 Fix #716 - uss string inference to inform property names 2018-05-08 21:21:22 -04:00
Matthew Brown
c1440c11dc Create separate file for magic properties 2018-05-08 20:25:39 -04:00
Matthew Brown
e50ef8bf03 Support __invoke return types 2018-05-08 19:49:25 -04:00
Tyson Andre
9a9f6d1856 Make the string concatenation of two known values into a known value (#717)
* Make the string concatenation of two known values into a known value

address review comments

* Add vim temporary files to .gitignore
2018-05-08 19:11:18 -04:00
Matt Brown
6e259bed03 Always evaluate closures, even when passed as mixed call args 2018-05-08 18:11:10 -04:00
Matt Brown
53ff05783c Clean up code slightly 2018-05-08 17:43:26 -04:00
Matt Brown
4f678f5f99 Fix bad comparisons 2018-05-08 17:42:02 -04:00
Matt Brown
03ea65cff8 Don’t complain about false values on properties when we don’t care 2018-05-08 16:57:16 -04:00
Matt Brown
bc17d23788 Fix mixed empty checks 2018-05-08 16:34:08 -04:00
Matt Brown
3c9e42f884 Fix string assertion for ternaries 2018-05-07 17:52:18 -04:00
Matt Brown
f858924b60 Fix erroneous string matching after oring 2018-05-07 17:40:16 -04:00