Skip to content

Commit

Permalink
Optimized some strlen() calls when possible
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Jul 16, 2021
1 parent 9c85c35 commit 6572edf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Definition/ArrayNode.php
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public function getDefaultValue()
public function addChild(NodeInterface $node)
{
$name = $node->getName();
if (!\strlen($name)) {
if ('' === $name) {
throw new \InvalidArgumentException('Child nodes must be named.');
}
if (isset($this->children[$name])) {
Expand Down

0 comments on commit 6572edf

Please sign in to comment.