Page MenuHomeWickedGov Phorge

OffsetAccessTypeNode.php
No OneTemporary

Size
628 B
Referenced Files
None
Subscribers
None

OffsetAccessTypeNode.php

<?php declare(strict_types = 1);
namespace PHPStan\PhpDocParser\Ast\Type;
use PHPStan\PhpDocParser\Ast\NodeAttributes;
class OffsetAccessTypeNode implements TypeNode
{
use NodeAttributes;
public TypeNode $type;
public TypeNode $offset;
public function __construct(TypeNode $type, TypeNode $offset)
{
$this->type = $type;
$this->offset = $offset;
}
public function __toString(): string
{
if (
$this->type instanceof CallableTypeNode
|| $this->type instanceof NullableTypeNode
) {
return '(' . $this->type . ')[' . $this->offset . ']';
}
return $this->type . '[' . $this->offset . ']';
}
}

File Metadata

Mime Type
text/x-php
Expires
Sat, Nov 21, 22:54 (1 d, 23 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
21/cc/8c49aed59260d1d7dd77ad6f7f1c
Default Alt Text
OffsetAccessTypeNode.php (628 B)

Event Timeline