Skip to content

Commit 641d229

Browse files
committed
Minor refactor - removing updateProcessStatus when asking for getState - not related
1 parent 205daed commit 641d229

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Helper/Shell.php

+3-4
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ protected function setInput()
8080

8181
protected function updateProcessStatus()
8282
{
83-
if (self::STATE_STARTED !== $this->state) {
83+
if ($this->state !== self::STATE_STARTED) {
8484
return;
8585
}
8686

@@ -120,8 +120,6 @@ public function execute()
120120

121121
public function getState()
122122
{
123-
$this->updateProcessStatus();
124-
125123
return $this->state;
126124
}
127125

@@ -166,7 +164,8 @@ public function stop()
166164
\proc_close($this->process);
167165
}
168166

169-
$this->state = self::STATE_TERMINATED;
167+
$this->state = self::STATE_TERMINATED;
168+
170169
$this->exitCode = $this->processStatus['exitcode'];
171170

172171
return $this->exitCode;

0 commit comments

Comments
 (0)