File tree Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Expand file tree Collapse file tree 2 files changed +56
-1
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Cully ;
4+
5+ interface ICommand {
6+ /**
7+ * @return bool
8+ */
9+ public function hasRun ();
10+ /**
11+ * Whether the last command succeeded. Will return FALSE if no
12+ * command has been executed (we haven't succeeded because we
13+ * haven't tried).
14+ *
15+ * A successful command is one that has an exit code of 0.
16+ *
17+ * @return bool
18+ */
19+ public function success ();
20+ /**
21+ * Whether the last command failed. This will return FALSE if no
22+ * command has been executed (we haven't failed because we haven't
23+ * tried).
24+ *
25+ * @return bool
26+ */
27+ public function failure ();
28+ /**
29+ * The last command executed.
30+ *
31+ * @return string
32+ */
33+ public function getCommand ();
34+ /**
35+ * Will be null if a command hasn't been executed, or if the
36+ * last executed command didn't return an exit code.
37+ *
38+ * @return int|null
39+ */
40+ public function getExitStatus ();
41+ /**
42+ * Standard output from command.
43+ *
44+ * @return string
45+ */
46+ public function getOutput ();
47+ /**
48+ * Standard error from the command.
49+ *
50+ * @return string
51+ */
52+ public function getError ();
53+ }
Original file line number Diff line number Diff line change 22
33namespace Cully \Local ;
44
5- class Command {
5+ use Cully \ICommand ;
6+
7+ class Command implements ICommand {
68 /**
79 * @var string
810 */
You can’t perform that action at this time.
0 commit comments