Skip to content
This repository was archived by the owner on Feb 6, 2020. It is now read-only.

Commit 9314370

Browse files
committed
Optimization
1 parent e325179 commit 9314370

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/ServiceManager.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ public function get($name)
166166

167167
$object = $this->doCreate($name);
168168

169-
if (($this->sharedByDefault && !isset($this->shared[$name]))
170-
|| (isset($this->shared[$name]) && $this->shared[$name])) {
169+
if ($this->sharedByDefault ^ isset($this->shared[$name])) {
171170
$this->services[$name] = $object;
172171
}
173172

0 commit comments

Comments
 (0)