Skip to content

Commit 11872a4

Browse files
minor #29031 SCA: minor code tweaks (kalessil)
This PR was merged into the 4.1 branch. Discussion ---------- SCA: minor code tweaks | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Removed unused variables Commits ------- e4466bf4f0 SCA: removed unused variables
2 parents be2ba2b + 71b4a1a commit 11872a4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ContainerBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ private function createService(Definition $definition, array &$inlineServices, $
11221122
}
11231123
}
11241124
} else {
1125-
$r = new \ReflectionClass($class = $parameterBag->resolveValue($definition->getClass()));
1125+
$r = new \ReflectionClass($parameterBag->resolveValue($definition->getClass()));
11261126

11271127
$service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs($arguments);
11281128

Loader/YamlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ private function checkDefinition($id, array $definition, $file)
782782
{
783783
if ($this->isLoadingInstanceof) {
784784
$keywords = self::$instanceofKeywords;
785-
} elseif ($throw = (isset($definition['resource']) || isset($definition['namespace']))) {
785+
} elseif (isset($definition['resource']) || isset($definition['namespace'])) {
786786
$keywords = self::$prototypeKeywords;
787787
} else {
788788
$keywords = self::$serviceKeywords;

0 commit comments

Comments
 (0)