Skip to content

Commit

Permalink
Fix name and phpdoc of ContainerBuilder::removeBindings
Browse files Browse the repository at this point in the history
  • Loading branch information
teohhanhui committed Apr 20, 2019
1 parent e376c99 commit c93194d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Expand Up @@ -1527,13 +1527,13 @@ public function getRemovedBindingIds()
}

/**
* Adds a removed binding id.
* Removes bindings for a service.
*
* @param int $id
* @param string $id The service identifier
*
* @internal
*/
public function addRemovedBindingIds($id)
public function removeBindings($id)
{
if ($this->hasDefinition($id)) {
foreach ($this->getDefinition($id)->getBindings() as $key => $binding) {
Expand Down
Expand Up @@ -59,7 +59,7 @@ public function __destruct()
{
parent::__destruct();

$this->container->addRemovedBindingIds($this->id);
$this->container->removeBindings($this->id);

if (!$this->definition instanceof ChildDefinition) {
$this->container->setDefinition($this->id, $this->definition->setInstanceofConditionals($this->instanceof));
Expand Down
Expand Up @@ -91,7 +91,7 @@ public function registerClasses(Definition $prototype, $namespace, $resource, $e
*/
protected function setDefinition($id, Definition $definition)
{
$this->container->addRemovedBindingIds($id);
$this->container->removeBindings($id);

if ($this->isLoadingInstanceof) {
if (!$definition instanceof ChildDefinition) {
Expand Down

0 comments on commit c93194d

Please sign in to comment.