Skip to content

Commit 3e3979c

Browse files
kalessilfabpot
authored andcommitted
[2.3] [Config] [Console] [DependencyInjection] [DomCrawler] [Form] [HttpKernel] [PropertyAccess] [Security] [Translation] [Yaml] static code analysis, code cleanup
1 parent 994ac06 commit 3e3979c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Definition/Builder/ArrayNodeDefinition.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ protected function validatePrototypeNode(PrototypedArrayNode $node)
480480
);
481481
}
482482

483-
if (null !== $this->key && (null === $this->addDefaultChildren || is_integer($this->addDefaultChildren) && $this->addDefaultChildren > 0)) {
483+
if (null !== $this->key && (null === $this->addDefaultChildren || is_int($this->addDefaultChildren) && $this->addDefaultChildren > 0)) {
484484
throw new InvalidDefinitionException(
485485
sprintf('->addDefaultChildrenIfNoneSet() should set default children names as ->useAttributeAsKey() is used at path "%s"', $path)
486486
);

Definition/PrototypedArrayNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function setAddChildrenIfNoneSet($children = array('defaults'))
131131
if (null === $children) {
132132
$this->defaultChildren = array('defaults');
133133
} else {
134-
$this->defaultChildren = is_integer($children) && $children > 0 ? range(1, $children) : (array) $children;
134+
$this->defaultChildren = is_int($children) && $children > 0 ? range(1, $children) : (array) $children;
135135
}
136136
}
137137

Util/XmlUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ protected static function getXmlErrors($internalErrors)
215215
LIBXML_ERR_WARNING == $error->level ? 'WARNING' : 'ERROR',
216216
$error->code,
217217
trim($error->message),
218-
$error->file ? $error->file : 'n/a',
218+
$error->file ?: 'n/a',
219219
$error->line,
220220
$error->column
221221
);

0 commit comments

Comments
 (0)