From 6572edf59150ed6445d3b6481c1870a5d7c51dfc Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Fri, 16 Jul 2021 15:30:15 +0200 Subject: [PATCH] Optimized some strlen() calls when possible --- Definition/ArrayNode.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Definition/ArrayNode.php b/Definition/ArrayNode.php index c3c837a41..c6793a2b7 100644 --- a/Definition/ArrayNode.php +++ b/Definition/ArrayNode.php @@ -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])) {