Skip to content

Commit 4d5a306

Browse files
[DI] Minor dumping logic simplification
1 parent 761e51a commit 4d5a306

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dumper/PhpDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,7 @@ private function getServiceCall($id, Reference $reference = null)
16081608
$code = sprintf('$this->get(\'%s\')', $id);
16091609
}
16101610

1611-
if ($this->container->hasDefinition($id) && (!$this->container->getDefinition($id)->isPublic() || $this->container->getDefinition($id)->isShared())) {
1611+
if ($this->container->hasDefinition($id) && $this->container->getDefinition($id)->isShared()) {
16121612
// The following is PHP 5.5 syntax for what could be written as "(\$this->services['$id'] ?? $code)" on PHP>=7.0
16131613

16141614
$code = "\${(\$_ = isset(\$this->services['$id']) ? \$this->services['$id'] : $code) && false ?: '_'}";

0 commit comments

Comments
 (0)