@@ -41,10 +41,13 @@ public function __construct(
4141 parent ::__construct ($ newLine , $ indention );
4242
4343 // preload phan type aliases
44+ // @phpstan-ignore-next-line : PHPStan false-positive, not a bug
4445 $ this ->aliases += require __DIR__ . '/../resources/aliases/phan.php ' ;
4546 // preload psalm type aliases
47+ // @phpstan-ignore-next-line : PHPStan false-positive, not a bug
4648 $ this ->aliases += require __DIR__ . '/../resources/aliases/psalm.php ' ;
4749 // preload phpstan type aliases
50+ // @phpstan-ignore-next-line : PHPStan false-positive, not a bug
4851 $ this ->aliases += require __DIR__ . '/../resources/aliases/phpstan.php ' ;
4952
5053 foreach ($ aliases as $ alias => $ type ) {
@@ -142,6 +145,7 @@ protected function printUnionTypeNode(UnionTypeNode $node): string
142145 $ result = $ this ->formatUnionWithMixed ($ result );
143146 $ result = $ this ->formatBoolWithTrueAndFalse ($ result );
144147
148+ /** @var non-empty-string */
145149 return \vsprintf ($ shouldWrap ? '(%s) ' : '%s ' , [
146150 \implode ('| ' , [...\array_unique ($ result )]),
147151 ]);
@@ -191,6 +195,7 @@ private function formatUnionWithMixed(array $result): array
191195 #[\Override]
192196 protected function printIntersectionTypeNode (IntersectionTypeNode $ node ): string
193197 {
198+ /** @var non-empty-string */
194199 return \vsprintf ($ this ->nesting ++ > 0 ? '(%s) ' : '%s ' , [
195200 \implode ('& ' , [...$ this ->unwrapAndPrint ($ node )]),
196201 ]);
0 commit comments