upgraded dependencies
This commit is contained in:
@@ -26,6 +26,10 @@ class ServicesResetter implements ResetInterface
|
||||
private $resettableServices;
|
||||
private $resetMethods;
|
||||
|
||||
/**
|
||||
* @param \Traversable<string, object> $resettableServices
|
||||
* @param array<string, string|string[]> $resetMethods
|
||||
*/
|
||||
public function __construct(\Traversable $resettableServices, array $resetMethods)
|
||||
{
|
||||
$this->resettableServices = $resettableServices;
|
||||
@@ -36,6 +40,10 @@ class ServicesResetter implements ResetInterface
|
||||
{
|
||||
foreach ($this->resettableServices as $id => $service) {
|
||||
foreach ((array) $this->resetMethods[$id] as $resetMethod) {
|
||||
if ('?' === $resetMethod[0] && !method_exists($service, $resetMethod = substr($resetMethod, 1))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$service->$resetMethod();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user