Skip to content

Commit 341b79c

Browse files
committed
Fix printer linter issues
1 parent 678fe47 commit 341b79c

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

libs/printer/src/NativeTypePrinter.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ protected function printTypeListNode(TypesListNode $node): string
109109
#[\Override]
110110
protected function printTernaryType(TernaryExpressionNode $node): string
111111
{
112+
/** @var non-empty-string */
112113
return $this->make(new UnionTypeNode($node->then, $node->else));
113114
}
114115

libs/printer/src/PrettyPrinter.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ protected function printTemplateArgumentsNode(TemplateArgumentListNode $argument
356356
*/
357357
protected function printTemplateArgumentNode(TemplateArgumentNode $argument): string
358358
{
359+
/** @var non-empty-string $result */
359360
$result = $this->make($argument->value);
360361

361362
if ($argument->hint !== null) {
@@ -372,7 +373,7 @@ protected function printClassConstNode(ClassConstNode $node): string
372373
{
373374
return \vsprintf('%s::%s', [
374375
$node->class->toString(),
375-
(string) $node->constant?->toString(),
376+
$node->constant->toString(),
376377
]);
377378
}
378379

@@ -436,6 +437,7 @@ protected function printCallableArgumentNode(CallableParameterNode $node): strin
436437
$result = 'mixed';
437438

438439
if ($node->type !== null) {
440+
/** @var non-empty-string $result */
439441
$result = $this->make($node->type);
440442
}
441443

@@ -494,7 +496,7 @@ class: LogicalTypeNode::class,
494496
nodes: [$type],
495497
);
496498

497-
return $visitor->isFound();
499+
return $visitor->isFound;
498500
}
499501

500502
/**

libs/printer/src/Printer.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ public function print(TypeNode $stmt): string
4747
return $this->make($stmt);
4848
}
4949

50-
/**
51-
* @return non-empty-string
52-
*/
5350
abstract protected function make(TypeNode $stmt): string;
5451

5552
/**

0 commit comments

Comments
 (0)