Skip to content

Commit d3cac64

Browse files
committed
Merge methods initializeDaemonState() and setInitialDaemonState()
It's not necessary or advantageous to split the content in two methods.
1 parent 767dab4 commit d3cac64

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

library/Vspheredb/Daemon/VsphereDbDaemon.php

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ public function start(LoopInterface $loop)
118118
$this->loop = $loop;
119119
$logger = $this->logger;
120120
$this->daemonState = $this->initializeDaemonState();
121-
$this->setInitialDaemonState();
122121
$this->detectProcessInfo();
123122
$this->initializeDbLogger($logger); // TODO: move to sub process. Hint: needs no DB, has a queue
124123
$this->prepareApi($loop, $logger);
@@ -152,15 +151,10 @@ protected function initializeDaemonState()
152151
}
153152
$this->componentStates = $daemonState->getComponentStates();
154153
});
155-
156-
return $daemonState;
157-
}
158-
159-
protected function setInitialDaemonState()
160-
{
161-
$daemonState = $this->daemonState;
162154
$daemonState->setProcessTitle(self::PROCESS_NAME);
163155
$daemonState->setState(self::STATE_STARTING);
156+
157+
return $daemonState;
164158
}
165159

166160
protected function onComponentChange($component, $formerState, $currentState)

0 commit comments

Comments
 (0)