Page MenuHomeWickedGov Phorge

ParamTagValueNode.php
No OneTemporary

Size
988 B
Referenced Files
None
Subscribers
None

ParamTagValueNode.php

<?php declare(strict_types = 1);
namespace PHPStan\PhpDocParser\Ast\PhpDoc;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
use PHPStan\PhpDocParser\Ast\Type\TypeNode;
use function trim;
class ParamTagValueNode implements PhpDocTagValueNode
{
use NodeAttributes;
public TypeNode $type;
public bool $isReference;
public bool $isVariadic;
public string $parameterName;
/** @var string (may be empty) */
public string $description;
public function __construct(TypeNode $type, bool $isVariadic, string $parameterName, string $description, bool $isReference)
{
$this->type = $type;
$this->isReference = $isReference;
$this->isVariadic = $isVariadic;
$this->parameterName = $parameterName;
$this->description = $description;
}
public function __toString(): string
{
$reference = $this->isReference ? '&' : '';
$variadic = $this->isVariadic ? '...' : '';
return trim("{$this->type} {$reference}{$variadic}{$this->parameterName} {$this->description}");
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, May 16, 18:49 (5 h, 12 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
3f/77/de59fdd7a2b699711ae99d20e45a
Default Alt Text
ParamTagValueNode.php (988 B)

Event Timeline