class DoctrineArrayItem
@phpstan-import-type ValueType from DoctrineArgument @phpstan-type KeyType = ConstExprIntegerNode|ConstExprStringNode|IdentifierTypeNode|ConstFetchNode|null
Hierarchy
- class \PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine\DoctrineArrayItem implements \PHPStan\PhpDocParser\Ast\Node uses \PHPStan\PhpDocParser\Ast\NodeAttributes
Expanded class hierarchy of DoctrineArrayItem
1 file declares its use of DoctrineArrayItem
- Printer.php in vendor/
phpstan/ phpdoc-parser/ src/ Printer/ Printer.php
File
-
vendor/
phpstan/ phpdoc-parser/ src/ Ast/ PhpDoc/ Doctrine/ DoctrineArrayItem.php, line 16
Namespace
PHPStan\PhpDocParser\Ast\PhpDoc\DoctrineView source
class DoctrineArrayItem implements Node {
use NodeAttributes;
/** @var KeyType */
public $key;
/** @var ValueType */
public $value;
/**
* @param KeyType $key
* @param ValueType $value
*/
public function __construct($key, $value) {
$this->key = $key;
$this->value = $value;
}
public function __toString() : string {
if ($this->key === null) {
return (string) $this->value;
}
return $this->key . '=' . $this->value;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
DoctrineArrayItem::$key | public | property | @var KeyType | |
DoctrineArrayItem::$value | public | property | @var ValueType | |
DoctrineArrayItem::__construct | public | function | * | |
DoctrineArrayItem::__toString | public | function | Overrides Node::__toString | |
NodeAttributes::$attributes | private | property | @var array<string, mixed> | |
NodeAttributes::getAttribute | public | function | * | |
NodeAttributes::hasAttribute | public | function | ||
NodeAttributes::setAttribute | public | function | * |