Skip to content

Commit f7f70c3

Browse files
Merge pull request #2 from sandeshjangam/check-exit-status-method
Added a method to check exist status
2 parents 6e976ad + 688b567 commit f7f70c3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/SshCommand.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,12 @@ public function getExitStatus(): int|false
107107
{
108108
return $this->exitStatus;
109109
}
110+
111+
/**
112+
* Check if the exit status of the command matches the given status.
113+
*/
114+
public function isExitStatus(int|false $status): bool
115+
{
116+
return $this->exitStatus === $status;
117+
}
110118
}

0 commit comments

Comments
 (0)