mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-24 11:44:14 +01:00
fix of/as
This commit is contained in:
parent
4132d9d885
commit
26b00c7b13
@ -19,9 +19,9 @@ final class AttributeAwareTemplateTagValueNode extends TemplateTagValueNode impl
|
||||
*/
|
||||
private $preposition;
|
||||
|
||||
public function __construct(string $name, ?TypeNode $bound, string $description, string $originalContent)
|
||||
public function __construct(string $name, ?TypeNode $typeNode, string $description, string $originalContent)
|
||||
{
|
||||
parent::__construct($name, $bound, $description);
|
||||
parent::__construct($name, $typeNode, $description);
|
||||
|
||||
$matches = Strings::match($originalContent, '#\s+(?<preposition>as|of)\s+#');
|
||||
$this->preposition = $matches['preposition'] ?? 'of';
|
||||
|
@ -5,7 +5,7 @@ declare(strict_types=1);
|
||||
namespace Rector\BetterPhpDocParser\Tests\PhpDocParser\TagValueNodeReprint\Fixture\Native\Template;
|
||||
|
||||
/** @template T as int */
|
||||
final class TemplateTagAsOf
|
||||
final class TemplateTagAs
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Rector\BetterPhpDocParser\Tests\PhpDocParser\TagValueNodeReprint\Fixture\Native\Template;
|
||||
|
||||
/** @template T of int */
|
||||
final class TemplateTagOf
|
||||
{
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user