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
Brown
d04e21ee5a
Define mixin declaring classname
2020-05-26 23:32:07 -04:00
Brown
f0a5bd74b6
Detect never-return statement same as a throw
2020-05-26 15:02:23 -04:00
Brown
0b2da18f1e
Break up StatementsAnalyzer
2020-05-19 12:56:30 -04:00
Brown
8f2f2617d4
Improve refactor
2020-05-10 22:45:01 -04:00
Brown
5f4d162dd5
Break out type expander into separate class
2020-05-10 22:39:18 -04:00
Brown
aa3846758e
Fix #3153 - narrow template types in conditional branches
2020-04-17 09:53:58 -04:00
Brown
27032e875f
Ensure Generator return types are enforced for a function using yield from
2020-04-06 09:23:13 -04:00
Brown
08594cf712
Always be cloning
2020-04-03 13:56:03 -04:00
Brown
af4a7cabe9
Fix #3057 and add support for @psalm-yield annotation
2020-04-02 22:38:10 -04:00
Brown
63b35fc889
Fix #3058 - use value for generator inference
2020-04-02 20:37:09 -04:00
Matthew Brown
194f02507d
Allow conditional types to reference class constants
2020-03-29 13:37:37 -04:00