1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-02 17:52:45 +01:00
Commit Graph

6838 Commits

Author SHA1 Message Date
Brown
27a009fd69 Fix #3417 - Treat $this as static-y 2020-05-22 13:32:26 -04:00
Matthew Brown
4f33330215
Add nullable type 2020-05-22 13:18:18 -04:00
Brown
bebfac0ab6 Fix #3426 - allow falsy reconciliation for templated params 2020-05-22 13:16:48 -04:00
Brown
1b84fc2c12 Fix #3419 - don’t add null to return type when template/conditional return is used 2020-05-22 12:44:19 -04:00
Brown
8632cdb3cd Improve taint tracking during scanning phase 2020-05-22 12:33:48 -04:00
Brown
63c3678ae5 Improve property location resolution 2020-05-22 12:33:38 -04:00
Matthew Brown
187b944680 Add faster taint analysis 2020-05-22 12:33:29 -04:00
Matthew Brown
6784a90b2f Fix #3423 - allow conditional with func_num_args() in namespace 2020-05-21 11:29:54 -04:00
Matthew Brown
952216ff21 Fix test 2020-05-20 23:24:50 -04:00
Joe Hoyle
6f28d741bc
Display variable assignment type in LSP hovers (#3401)
* Add node references for variable assignments

* Break up line

Co-authored-by: Matthew Brown <github@muglug.com>
2020-05-20 17:40:22 -04:00
Joe Hoyle
1c3796d2a0
Add BeforeAnalyzeFileInterface to Plugin documentation (#3413)
This was missing for one reason or another.
2020-05-20 09:13:29 -04:00
Matthew Brown
3effdc5b69 Improve yield type substitution 2020-05-20 09:12:24 -04:00
Matthew Brown
2d02064962 Fix #3407 - allow multiple matching generic classes in union 2020-05-20 09:11:17 -04:00
Jáchym Toušek
8855b6c1d9
Fix Ds\Map methods (#3412) 2020-05-20 07:27:25 -04:00
Brown
2ec76f01c2 Fix redundant condition 2020-05-19 20:11:25 -04:00
Brown
27cb660377 Respect possibly-undefined array keys while merging
Fixes #3393
2020-05-19 20:10:01 -04:00
Brown
a4141a7581 Fix #3327 - convert void to null when comparing conditional type with nullable 2020-05-19 19:48:11 -04:00
Brown
742282bbb5 More config 2020-05-19 17:51:28 -04:00
Brown
30feaf3faa Improve Scrutinizer config 2020-05-19 17:43:50 -04:00
Brown
f335560b69 Allow setting property on templated type 2020-05-19 17:31:05 -04:00
Brown
6ec5763847 Filter out traversable possibly-mixed too 2020-05-19 16:26:00 -04:00
Brown
a3214012a6 Only convert userland functions 2020-05-19 16:15:41 -04:00
Brown
baeb86ca8f Fix #3403 - remove possibly-mixed key 2020-05-19 16:12:37 -04:00
Brown
4415e0f69c Fix special case calling callable param with string non-global function
Fixes #3411
2020-05-19 15:48:31 -04:00
Matthew Brown
777b6e8d91 Simplify conditional 2020-05-19 15:07:30 -04:00
Brown
b5ae0167a2 Fix typo 2020-05-19 14:58:53 -04:00
Brown
b38d945b12 Cast null and false to empty string
Ref #3408
2020-05-19 14:53:06 -04:00
Brown
8becefda04 Forbid :: in object-like key name
Ref #3399
2020-05-19 14:38:46 -04:00
Šimon Podlipský
dc82243edc
Add RdKafka:flush() to CallMap (#3410) 2020-05-19 12:56:58 -04:00
Brown
0b2da18f1e Break up StatementsAnalyzer 2020-05-19 12:56:30 -04:00
Joe Hoyle
588be3b269
Fix getSymbolInformation() for symbols containing ":" (#3400)
Currently a Symbol like `10-15:array{foo: string}` will return ` string}`, as the regex does not specify a string-start caret.
2020-05-19 10:15:13 -04:00
Šimon Podlipský
47cf69ded1
Fix RdKafka maps (#3404)
Resolves #3388
2020-05-19 10:13:25 -04:00
Brown
666cc3b4c9 Fix BinaryOp analysis 2020-05-18 23:00:53 -04:00
Brown
8e5b330c5a Break apart CallAnalyzer 2020-05-18 22:57:00 -04:00
Brown
5b06c206e0 Move classes into deeper namespace 2020-05-18 22:52:33 -04:00
Brown
ace049a068 Beautify BinaryOpAnalyzer 2020-05-18 18:57:09 -04:00
orklah
478bb267d8
stubs for array_sum (#3395) 2020-05-18 17:23:21 -04:00
Brown
3c5b4dec06 Add documentation for MixedClone 2020-05-18 17:20:57 -04:00
Brown
8c86d47eb7 Downgrade some PossiblyInvalidClone issues 2020-05-18 17:18:13 -04:00
Brown
4ca83ca30d Add slash 2020-05-18 17:05:47 -04:00
Brown
3a582dde8d Allow merging of numeric-string and literal string 2020-05-18 16:57:16 -04:00
Brown
2312523318 Support merging of numeric-string with literal 2020-05-18 16:56:09 -04:00
Brown
b62f646388 Fix #3391 - move_uploaded_file mutates 2020-05-18 16:26:08 -04:00
Evgeniy
04a576708c
Correct analyze clone expression (#3382)
* Correct analyze clone, add PossibleInvalidClone issue type

* Infer mixed type when possible incorrect clone

* Remove unused variable
2020-05-18 16:22:50 -04:00
feek
d60ece752c
chore: mark as lowercase string (#3392) 2020-05-18 16:02:46 -04:00
Brown
ea0a99d3a8 Fix bad merge 2020-05-18 16:02:10 -04:00
Brown
5ee1487a01 Make ExpressionAnalyzer more beautiful 2020-05-18 15:13:27 -04:00
SignpostMarv
911ac2d363
Infer numeric-string from (string)$numeric (#3390)
* adding test for vimeo/psalm#3370

* check if typecast will result in numeric-string

* int & float as per examples in vimeo/psalm#3370
* numeric & numeric-string because they shouldn't lose numericness.

* satisfy phpcs

* adjusting assertions to reflect typecasting change
2020-05-18 13:42:47 -04:00
Brown
21798efed2 Fix #3388 - eliminate null after < 0 check 2020-05-18 08:52:44 -04:00
Mark Sch
9aa46221f6
Use pretty print for JSON reporting. (#3364)
* Use pretty print for JSON reporting.

* Use pretty print for JSON reporting.

* Use pretty-print option on CLI for BC.

* Change static:: const to self::

Co-authored-by: Matthew Brown <github@muglug.com>
2020-05-18 08:40:20 -04:00