Skip to content

Commit a40f340

Browse files
committed
fixed CS
1 parent 73cce0a commit a40f340

File tree

3 files changed

+5
-15
lines changed

3 files changed

+5
-15
lines changed

Compiler/CheckCircularReferencesPass.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@ private function checkOutEdges(array $edges)
6161

6262
if (empty($this->checkedNodes[$id])) {
6363

64-
// * don't check circular dependencies in lazy services.
65-
$isLazy = $node->getValue() && $node->getValue()->isLazy();
66-
if (!$isLazy) {
64+
// don't check circular dependencies for lazy services
65+
if (!$node->getValue() && $node->getValue()->isLazy()) {
6766
$searchKey = array_search($id, $this->currentPath);
6867
$this->currentPath[] = $id;
6968

Dumper/PhpDumper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1294,9 +1294,9 @@ private function hasReference($id, array $arguments, $deep = false, array &$visi
12941294

12951295
$service = $this->container->getDefinition($argumentId);
12961296

1297-
// if exists proxy dumper (proxy-manager) don't search references in lazy services.
1298-
// As these services will be instantiated lazily and don't have direct related references.
1299-
if ($service->isLazy() && !($this->getProxyDumper() instanceof NullDumper)) {
1297+
// if the proxy manager is enabled, disable searching for references in lazy services,
1298+
// as these services will be instantiated lazily and don't have direct related references.
1299+
if ($service->isLazy() && !$this->getProxyDumper() instanceof NullDumper) {
13001300
continue;
13011301
}
13021302

Tests/Fixtures/includes/classes.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,25 +82,16 @@ public function callPassed()
8282

8383
class DummyProxyDumper implements ProxyDumper
8484
{
85-
/**
86-
* {@inheritdoc}
87-
*/
8885
public function isProxyCandidate(Definition $definition)
8986
{
9087
return false;
9188
}
9289

93-
/**
94-
* {@inheritdoc}
95-
*/
9690
public function getProxyFactoryCode(Definition $definition, $id)
9791
{
9892
return '';
9993
}
10094

101-
/**
102-
* {@inheritdoc}
103-
*/
10495
public function getProxyCode(Definition $definition)
10596
{
10697
return '';

0 commit comments

Comments
 (0)