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

131 Commits

Author SHA1 Message Date
orklah
af414ffe59
Merge pull request #6642 from orklah/inside-conditional
Inside conditional
2021-10-11 20:45:14 +02:00
orklah
911076939c
Merge pull request #6628 from orklah/phpparser2
Php-Parser 4.13
2021-10-11 20:42:32 +02:00
orklah
21456b85b1 add Never for throws. Add Never only if at top level 2021-10-11 19:35:18 +02:00
orklah
f9377c53fc infer never on closures(and more?) 2021-10-11 18:52:26 +02:00
orklah
c4ebc34695 suppress or use the return type 2021-10-11 17:27:52 +02:00
orklah
870ee4ff93 ->args to ->getArgs 2021-10-09 23:37:04 +02:00
orklah
53c0a4e63a cleanup 2021-10-04 00:03:06 +02:00
orklah
ab6efe49b2 fix CS 2021-09-26 23:41:26 +02:00
orklah
72eab30a3a coalesce operator 2021-09-26 23:34:31 +02:00
orklah
46801c4b98 clearer string operations 2021-09-26 23:34:31 +02:00
orklah
53e4719c19 boolean cast 2021-09-26 22:39:01 +02:00
orklah
a92fee8ae3 better combining 2021-09-25 11:21:06 +02:00
orklah
97e91e6bf0 code trimming 2021-09-25 02:34:21 +02:00
orklah
06af927f12 fix an error I made a few months ago 2021-07-26 23:09:27 +02:00
Bruce Weirdan
6abce3525a
Enforce use sort (#5900) 2021-06-07 22:55:21 -04:00
Matt Brown
9eda9f9bbf Fix cs 2021-05-17 19:44:55 -04:00
Matt Brown
21456f51e6 Only call ScopeAnalyzer once on whole function body 2021-05-17 18:52:25 -04:00
Matt Brown
f6bdeb6234 Fix switch-with-continue bug 2021-05-17 07:27:58 -05:00
orklah
1a59e81808
allow scalar values in return to be accepted, even when the branch has no inferred types (#5749) 2021-05-12 18:47:05 -04:00
Bruce Weirdan
9e19653a72
Infer never return type (#5710)
* Allow __toString to return never

Fixes vimeo/psalm#5653

* Push $return_is_exit down

* Produce unique control actions

* Test suggesting `@return never`
2021-05-05 01:22:29 -04:00
Matt Brown
8b5e0fc754 Fix #5172 - prevent calling function with implicitly-broader type 2021-02-07 11:07:22 -05:00
Matt Brown
58b306b6e3 Ensure class template types are mapped to static methods where necessary
Ref #4733
2020-11-29 17:40:52 -05:00
Matt Brown
ea314cc1c0 Simplify calling of replacer methods 2020-11-29 16:27:00 -05:00
Matt Brown
b717356f95 Simplify more things 2020-11-27 17:48:39 -05:00
orklah
2bf25d5f50
Emit an issue when returning a Stringable object when a string is expected (#4657)
* Emit an issue when returning a Stringable object when a string is expected

* Fix issue in Psalm codebase
2020-11-24 00:18:24 -05:00
orklah
6b72599ec5
allow static return type in PHP8 (#4641) 2020-11-20 18:46:35 -05:00
Matt Brown
388e804ed8 Allow opt-in to strict return type checking 2020-11-05 18:20:04 -05:00
Matt Brown
b6dbc34523 Track final-ness of class when evaluating trait returns 2020-10-25 12:20:18 -04:00
Matt Brown
1c836ad2fb Invalidate signature types when use changes 2020-10-22 18:07:27 -04:00
Matt Brown
be1cd5275e Fix #4349 - improve types for suggested unions 2020-10-16 17:56:31 -04:00
Matt Brown
8d2e88ef41 Fix #4333 - don’t get tripped up on try with no catches 2020-10-15 10:15:55 -04:00
orklah
10f2966dcb
return types (#4311)
* return types

* remove willReturn for void methods
2020-10-12 15:02:52 -04:00
Matt Brown
377dc8da8f 4.x - change/remove some default config values 2020-10-05 10:08:41 -04:00
orklah
37a2f8a33d
unused use statements (#4228) 2020-09-22 01:10:46 -04:00
orklah
24a38f21ce
Use array destructuring when possible (#4221)
* list usage

* fix inversion
2020-09-20 12:55:38 -04:00
orklah
a9a364e363
Misc improvements (#4216)
* misc changes

* fix CI
2020-09-20 08:55:28 -04:00
Brown
02b725f8a2 Add back suppression 2020-09-14 11:02:04 -04:00
Brown
1df3c9365c Fix template check 2020-09-14 10:00:09 -04:00
Brown
77e84b3817 Fix a few more things 2020-09-13 23:28:31 -04:00
Brown
8f8dbfbd72 Fix #4122 - detect yield in function arguments 2020-09-13 17:13:26 -04:00
orklah
da47588f91
replace return; by return null; in every non-void method, add return null; when mising, add return types, remove redundant phpdoc (#4176) 2020-09-13 16:39:06 -04:00
orklah
ead107fa9e
More return types (#4173)
* add native return types

* redundant phpdoc
2020-09-12 11:24:05 -04:00
orklah
8c7423505a
add native param types (#4137)
* add native param types

* redundant phpdoc

* add more param types and adds "?" to nullable types

* remove redundant phpdoc

* add more param types and remove redundant phpdoc

* add more param types and remove redundant phpdoc
2020-09-06 19:36:47 -04:00
orklah
f66d57f19d
add native return types (#4116)
* add native return types

* remove redundant phpdoc
2020-09-04 16:26:33 -04:00
Brown
92239add4d Add some backwards-incompatible changes for 4.x 2020-08-30 11:44:14 -04:00
Brown
6ab3e732fb Fix #4038 - don’t remove null types unnecessarily in mixed union 2020-08-25 15:50:33 -04:00
Brown
4026b717b9 Allow function manipulators to work in threaded mode 2020-08-23 18:05:48 -04:00
Brown
e808391f56 Fix #3943 - understand trait return types a bit better 2020-08-05 15:58:26 -04:00
Brown
76bd5b6278 Refactor type comparison 2020-07-21 19:40:35 -04:00
Brown
95bf7f835b Improve handling of array_map, faking out calls where nececssary 2020-06-25 13:05:34 -04:00