Skip to content

Commit fd561e2

Browse files
committed
[BCB] Remove PropertyTag::getType()
1 parent 93201eb commit fd561e2

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

UPGRADING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,4 @@ Instead of `PHPStanTestCase::createBroker()`, call `PHPStanTestCase::createRefle
242242
* Remove `ClassReflection::getFileNameWithPhpDocs()`, use `getFileName()` instead
243243
* Remove `AnalysisResult::getInternalErrors()`, use `getInternalErrorObjects()` instead
244244
* Remove `ConstantReflection::getValue()`, use `getValueExpr()` instead. To get `Type` from `Expr`, use `Scope::getType()` or `InitializerExprTypeResolver::getType()`
245+
* Remove `PropertyTag::getType()`, use `getReadableType()` / `getWritableType()` instead

src/PhpDoc/PhpDocNodeResolver.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ public function resolvePropertyTags(PhpDocNode $phpDocNode, NameScope $nameScope
112112
$resolved[$propertyName] = new PropertyTag(
113113
$propertyType,
114114
$propertyType,
115-
$propertyType,
116115
);
117116
}
118117
}
@@ -128,7 +127,6 @@ public function resolvePropertyTags(PhpDocNode $phpDocNode, NameScope $nameScope
128127
}
129128

130129
$resolved[$propertyName] = new PropertyTag(
131-
$propertyType,
132130
$propertyType,
133131
$writableType,
134132
);
@@ -146,7 +144,6 @@ public function resolvePropertyTags(PhpDocNode $phpDocNode, NameScope $nameScope
146144
}
147145

148146
$resolved[$propertyName] = new PropertyTag(
149-
$readableType ?? $propertyType,
150147
$readableType,
151148
$propertyType,
152149
);

src/PhpDoc/Tag/PropertyTag.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,12 @@ final class PropertyTag
1111
{
1212

1313
public function __construct(
14-
private Type $type,
1514
private ?Type $readableType,
1615
private ?Type $writableType,
1716
)
1817
{
1918
}
2019

21-
/**
22-
* @deprecated Use getReadableType() / getWritableType()
23-
*/
24-
public function getType(): Type
25-
{
26-
return $this->type;
27-
}
28-
2920
public function getReadableType(): ?Type
3021
{
3122
return $this->readableType;

0 commit comments

Comments
 (0)