minor #19565 Make IDEs handle the configuration tree (leofeyer)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #19565).
Discussion
----------
Make IDEs handle the configuration tree
| Q | A
| ------------- | ---
| Branch? | 2.7
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
When defining a configuration tree, my IDE (PhpStorm) gives me a lot of `Method 'scalarNode' not found in null|\Symfony\Component\Config\Definition\Builder\NodeParentInterface` warnings. This can easily be fixed by adding more return types to the phpDoc comments of the `end()` methods of the `NodeBuilder` and `NodeDefinition` classes.
Commits
-------
4e8bfc6
Enhance the phpDoc return types so IDEs can handle the configuration tree.
This commit is contained in:
commit
4d3411bd6d
@ -138,7 +138,7 @@ class NodeBuilder implements NodeParentInterface
|
||||
/**
|
||||
* Returns the parent node.
|
||||
*
|
||||
* @return ParentNodeDefinitionInterface The parent node
|
||||
* @return ParentNodeDefinitionInterface|NodeDefinition The parent node
|
||||
*/
|
||||
public function end()
|
||||
{
|
||||
|
@ -107,7 +107,7 @@ abstract class NodeDefinition implements NodeParentInterface
|
||||
/**
|
||||
* Returns the parent node.
|
||||
*
|
||||
* @return NodeParentInterface|null The builder of the parent node
|
||||
* @return NodeParentInterface|NodeBuilder|NodeDefinition|null The builder of the parent node
|
||||
*/
|
||||
public function end()
|
||||
{
|
||||
|
Reference in New Issue
Block a user