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

Commit

Permalink
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/ServiceManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,10 @@ public function addInitializer($initializer, $topOfStack = true)
*
* @param string $name
* @param mixed $service
* @param bool $shared
* @return ServiceManager
* @throws Exception\InvalidServiceNameException
*/
public function setService($name, $service, $shared = null)
public function setService($name, $service)
{
$cName = $this->canonicalizeName($name);

Expand All @@ -370,12 +369,8 @@ public function setService($name, $service, $shared = null)
$this->unregisterService($cName);
}

if ($shared === null) {
$shared = $this->shareByDefault();
}

$this->instances[$cName] = $service;
$this->shared[$cName] = (bool) $shared;

return $this;
}

Expand Down

0 comments on commit df9df5b

Please sign in to comment.