Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DoctrineArrayItem.php

function DoctrineArrayItem::__toString

Overrides Node::__toString

File

vendor/phpstan/phpdoc-parser/src/Ast/PhpDoc/Doctrine/DoctrineArrayItem.php, line 38

Class

DoctrineArrayItem
@phpstan-import-type ValueType from DoctrineArgument @phpstan-type KeyType = ConstExprIntegerNode|ConstExprStringNode|IdentifierTypeNode|ConstFetchNode|null

Namespace

PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine

Code

public function __toString() : string {
    if ($this->key === null) {
        return (string) $this->value;
    }
    return $this->key . '=' . $this->value;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal