1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\PhpDocParser\Ast\Type;
4:
5: use PHPStan\PhpDocParser\Ast\NodeAttributes;
6:
7: class OffsetAccessTypeNode implements TypeNode
8: {
9:
10: use NodeAttributes;
11:
12: /** @var TypeNode */
13: public $type;
14:
15: /** @var TypeNode */
16: public $offset;
17:
18: public function __construct(TypeNode $type, TypeNode $offset)
19: {
20: $this->type = $type;
21: $this->offset = $offset;
22: }
23:
24: public function __toString(): string
25: {
26: return $this->type . '[' . $this->offset . ']';
27: }
28:
29: }
30: