deaa6bd2ea
Add purity issues to baseline
2022-10-10 12:53:13 +02:00
2e8fd6fc1d
Add flag
2022-10-10 11:46:47 +02:00
0155ad7472
Immutable readonly 3
2022-10-03 15:13:47 +02:00
45452c7125
Immutable readonly 2
2022-10-03 14:02:41 +02:00
ef60a0c88c
Fix properties-of on generics&intersections
2022-10-03 11:28:01 +02:00
3abd0b961f
Immutable Unions
2022-10-03 10:45:36 +02:00
7a7a7f6bc9
cs-fix
2022-07-28 12:05:13 +02:00
33d8f3a62d
Fix unit tests
2022-07-28 12:03:12 +02:00
abe58876a7
Fix
2022-07-27 20:32:44 +02:00
6ce32a48d5
Fix
2022-07-27 20:24:24 +02:00
68f3f246f5
Fix
2022-07-27 20:08:00 +02:00
1a4d68e53b
Make private
2022-07-27 18:56:24 +02:00
82e8c0dea8
Disable intersection of unrelated classes
2022-07-27 18:55:01 +02:00
c409675e3e
Fix intersection of final classes
2022-07-27 18:46:07 +02:00
orklah
63b802bff4
remove TPositiveInt
2022-01-23 23:49:23 +01:00
orklah
7c4f08067b
Merge remote-tracking branch 'upstream/4.x' into upstream-master5
2022-01-23 23:44:04 +01:00
orklah
3649712c66
deprecate TPositiveInt
2022-01-23 23:26:24 +01:00
orklah
d1a946c221
Merge pull request #7454 from petewalker/feat/native-intersections
...
feat: Handle native intersection types
2022-01-22 11:18:54 +01:00
Pete Walker
a3bdf1ba8c
feat: Handle native intersection types
...
Adds native intersection type handling to psalm, removing the previous `UnexpectedValueException`.
Where an intersection is found in the parse tree, the types are resolved using the existing `Type::intersectUnionTypes` function, which I assume is being used when they're encountered in the existing docblock annotations.
I've added a handful of tests to cover this, but they're certainly not exhaustive. Are there any specific edge cases I should target?
This change feels way too simple... so apologies if I've missed something fundamental..!
2022-01-21 12:59:55 +00:00
orklah
f9e392316f
remove unused imports
2022-01-21 00:17:06 +01:00
Matthew Brown
a435bc57b9
Rename was_static property to is_static to be more accurate
2022-01-09 14:45:07 -05:00
Matthew Brown
4abbd9cb1b
Simplify object comparison
2022-01-07 18:50:13 -05:00
Matthew Brown
0a78b320da
Remove commas for now
2022-01-04 23:15:16 +00:00
Matthew Brown
9e64375e25
Break up two intersection methods
...
At some later date it may be worth seeing whether these can be consolidated into a single intersection method
2022-01-04 23:09:02 +00:00
Matthew Brown
2358b96f54
Fix merge errors
2022-01-03 04:10:39 +02:00
orklah
0747b48d06
remove TEmpty
2022-01-03 04:09:59 +02:00
orklah
8d6b781b3e
use consistent way to compare php version
2022-01-02 13:35:43 +02:00
rarila
97e6511fab
Set number of lines before and after namespace.
2021-12-15 04:58:32 +01:00
rarila
1c298c4605
Conversion of Psalm\Type
2021-12-14 02:31:22 +01:00
ralila
e32af3c05a
Conversion of Psalm\Type\Atomic
2021-12-14 02:26:28 +01:00
rarila
39402c233d
Return type hints ( #7065 )
...
Co-authored-by: ralila <>
2021-12-05 19:51:26 +02:00
ralila
30a65685a2
Import instead of using fqn classes
2021-12-03 21:40:18 +01:00
ralila
245920e53c
Import instead of using fqn
2021-12-03 20:11:20 +01:00
sasezaki
5a01c8d601
Added phpcs SelfMemberReference rule, and applied
2021-11-07 15:47:39 +09:00
orklah
4783149773
deprecate TEmpty
2021-10-27 21:26:31 +02:00
orklah
5efd49f38d
fix redundant condition
2021-10-02 10:09:40 +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
dbf3512b70
introduce $definite_class flag and use it to avoid using final keyword for simple inference
2021-08-19 23:19:59 +02:00
Alexandr Zolotukhin
d7f83c3b5e
Fix issues detected by psalm
2021-08-10 20:07:53 +03:00
Alexandr Zolotukhin
9687836519
Fix intersection calculation for unions of scalar types
2021-08-05 23:15:58 +03:00
Bruce Weirdan
6abce3525a
Enforce use
sort ( #5900 )
2021-06-07 22:55:21 -04:00
orklah
f62b83a190
Assert intersection type when two variables are compared ( #5774 )
2021-05-18 16:14:58 -04:00
orklah
ab1732de66
combining never/empty twice gives never ( #5756 )
2021-05-12 18:46:37 -04:00
AndrolGenhald
d022910599
ConcatAnalyzer improvements and non-falsy-string fixes. ( #5544 )
...
* ConcatAnalyzer improvements.
Deduplicate code.
Improve type inference.
Allow literal type inference when only one side has multiple types (fixes #5483 ).
Fix invalid type inference with negative int as right operand.
* Fix inference to be lowercase-string when concatenating int.
* Fix TNonEmptyLowercaseString to not be subtype of TNonFalsyString.
'0' is a non-empty-lowercase-string that is falsy.
* Fix other issues with non-falsy-string.
* Nest ands and ors
Co-authored-by: Matthew Brown <github@muglug.com>
2021-03-31 23:16:21 -04:00
orklah
f9fccb2b2d
implement DTO for plugins ( #4881 )
...
* implement DTO for plugins
* introduce EventHandler + reintroduce legacy API for plugins
2021-01-06 09:05:53 -05:00
orklah
bcc378bd20
handle concatenation with int parts ( #4938 )
2021-01-06 09:01:53 -05:00
orklah
1d9987e0ed
fix phpdoc ( #4905 )
2020-12-29 11:42:41 +00:00
orklah
09fb141e49
Document lowercase-string when possible ( #4904 )
...
* document lowercase-string
* fix missing strtolower
2020-12-29 11:42:12 +00:00
Matt Brown
5f065d3d74
Turn template bound tuples into object
...
Ref #4714
2020-11-27 11:43:30 -05:00