Skip to content
Permalink
Browse files

rename method

  • Loading branch information...
taylorotwell committed Sep 30, 2019
1 parent 6537549 commit a52a0dd239262f31edfaefe9a99213cccefc2f36
Showing with 16 additions and 14 deletions.
  1. +15 −13 src/Illuminate/Log/LogManager.php
  2. +1 −1 tests/Log/LogManagerTest.php
@@ -98,19 +98,6 @@ public function driver($driver = null)
return $this->get($driver ?? $this->getDefaultDriver());
}
/**
* @param string|null $driver
* @return void
*/
public function purge($driver = null)
{
$driver = $driver ?? $this->getDefaultDriver();
if (isset($this->channels[$driver])) {
unset($this->channels[$driver]);
}
}
/**
* @return array
*/
@@ -479,6 +466,21 @@ public function extend($driver, Closure $callback)
return $this;
}
/**
* Unset the given channel instance.
*
* @param string|null $name
* @return $this
*/
public function forgetChannel($driver = null)
{
$driver = $driver ?? $this->getDefaultDriver();
if (isset($this->channels[$driver])) {
unset($this->channels[$driver]);
}
}
/**
* System is unusable.
*
@@ -337,7 +337,7 @@ public function testLogMnagerPurgeResolvedChannels()
$this->assertCount(1, $manager->getChannels());
$manager->purge('single');
$manager->forgetChannel('single');
$this->assertEmpty($manager->getChannels());
}

0 comments on commit a52a0dd

Please sign in to comment.
You can’t perform that action at this time.