We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9a8738d commit 31ea9a2Copy full SHA for 31ea9a2
tests/PHPStan/Analyser/data/type-aliases.php
@@ -65,6 +65,7 @@ class Qux
65
* @phpstan-type RecursiveTypeAlias RecursiveTypeAlias[]
66
* @phpstan-type CircularTypeAlias1 CircularTypeAlias2
67
* @phpstan-type CircularTypeAlias2 CircularTypeAlias1
68
+ * @phpstan-type int ShouldNotHappen
69
* @property GlobalTypeAlias $globalAliasProperty
70
* @property LocalTypeAlias $localAliasProperty
71
* @property ImportedTypeAlias $importedAliasProperty
@@ -141,6 +142,12 @@ public function __get(string $name)
141
142
return null;
143
}
144
145
+ /** @param int $int */
146
+ public function testIntAlias($int)
147
+ {
148
+ assertType('int', $int);
149
+ }
150
+
151
152
153
assertType('int|string', (new Foo)->globalAliasProperty);
0 commit comments