Skip to content

Commit

Permalink
fix template
Browse files Browse the repository at this point in the history
  • Loading branch information
shmax committed Oct 1, 2023
1 parent 719be61 commit 655d968
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ parameters:
count: 1
path: src/Ast/NodeTraverser.php

-
message: "#^Strict comparison using \\=\\=\\= between 2 and 2 will always evaluate to true\\.$#"
count: 2
path: src/Ast/NodeTraverser.php

-
message: "#^Variable property access on PHPStan\\\\PhpDocParser\\\\Ast\\\\Node\\.$#"
count: 1
Expand Down
5 changes: 3 additions & 2 deletions tests/PHPStan/Printer/PrinterTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use PHPStan\PhpDocParser\Ast\Node;
use PHPStan\PhpDocParser\Ast\NodeTraverser;
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocNode;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use PHPStan\PhpDocParser\Parser\ConstExprParser;
use PHPStan\PhpDocParser\Parser\PhpDocParser;
use PHPStan\PhpDocParser\Parser\TypeParser;
Expand All @@ -33,11 +34,11 @@ abstract class PrinterTestBase extends TestCase
protected $phpDocParser;

/**
* @template TNode $node of TypeNode
* @template TNode of TypeNode
* @param TNode $node
* @return TNode
*/
public static function withComment(mixed $node, string $comment): mixed
public static function withComment(TypeNode $node, string $comment): TypeNode
{
$node->setAttribute(Attribute::COMMENTS, [new Comment($comment)]);
return $node;
Expand Down

0 comments on commit 655d968

Please sign in to comment.