minor #30817 [Config] Improve PHPdoc / IDE autocomplete for config tree builder (Koc)

This PR was merged into the 4.2 branch.

Discussion
----------

[Config] Improve PHPdoc / IDE autocomplete for config tree builder

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

follow up of #27476 and #21047

Commits
-------

21f797714e Improve PHPdoc / IDE autocomplete for config tree builder
This commit is contained in:
Fabien Potencier 2019-04-01 16:21:40 +02:00
commit bdfeb575bb

View File

@ -51,6 +51,9 @@ class TreeBuilder implements NodeParentInterface
return $this->root = $builder->node($name, $type)->setParent($this);
}
/**
* @return NodeDefinition|ArrayNodeDefinition The root node (as an ArrayNodeDefinition when the type is 'array')
*/
public function getRootNode(): NodeDefinition
{
if (null === $this->root) {