Leaves the current context by removing it from the context stack.
\Drupal\Core\Config\ConfigFactory The config factory object.
public function leaveContext() {
// Ensure at least one context is left on the stack. We already ensured
// there is at least one context set by taking the initial one in the
// constructor.
if (count($this->contextStack) > 1) {
array_pop($this->contextStack);
}
return $this;
}