Skip to content

Commit

Permalink
minor #44888 [Config] Fix return type of ExprBuilder::ifEmpty() (ga…
Browse files Browse the repository at this point in the history
…ssan)

This PR was merged into the 4.4 branch.

Discussion
----------

[Config] Fix return type of `ExprBuilder::ifEmpty()`

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| License       | MIT
| Doc PR        | N/A

phpstan probably moans otherwise: Call to an undefined method Symfony\Component\Config\Definition\Builder\NodeParentInterface::scalarNode().

The following code part does not cause any errors:
```php
->ifTrue(function ($v) {return empty($v);})
```

Commits
-------

a525715 Update ExprBuilder.php
  • Loading branch information
fancyweb committed Jan 3, 2022
2 parents 9cc7c6a + a525715 commit dcc1ffe
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -91,7 +91,7 @@ public function ifNull()
/**
* Tests if the value is empty.
*
* @return ExprBuilder
* @return $this
*/
public function ifEmpty()
{
Expand Down

0 comments on commit dcc1ffe

Please sign in to comment.