@@ -45,7 +45,7 @@ final class Application
45
45
private $ diConfigFile ;
46
46
47
47
/**
48
- * @var string
48
+ * @var string|null
49
49
*/
50
50
private $ logo = null ;
51
51
@@ -60,8 +60,11 @@ final class Application
60
60
private $ bgColour = 'black ' ;
61
61
62
62
/**
63
- * @param string $workshopTitle
64
- * @param $diConfigFile
63
+ * This is the main application class. It should be instantiated with the title of
64
+ * the workshop and the path to the DI configuration file.
65
+ *
66
+ * @param string $workshopTitle The workshop title - this is used throughout the application
67
+ * @param string $diConfigFile The absolute path to the DI configuration file
65
68
*/
66
69
public function __construct ($ workshopTitle , $ diConfigFile )
67
70
{
@@ -73,15 +76,21 @@ public function __construct($workshopTitle, $diConfigFile)
73
76
}
74
77
75
78
/**
76
- * @param string $check
79
+ * Register a custom check with the application. Exercises will only be use the check
80
+ * if it has been registered here.
81
+ *
82
+ * @param string $check The FQCN of the check
77
83
*/
78
84
public function addCheck ($ check )
79
85
{
80
86
$ this ->checks [] = $ check ;
81
87
}
82
88
83
89
/**
84
- * @param string $exercise
90
+ * Register an exercise with the application. Only exercises registered here will
91
+ * be displayed in the exercise menu.
92
+ *
93
+ * @param string $exercise The FQCN of the check
85
94
*/
86
95
public function addExercise ($ exercise )
87
96
{
@@ -104,7 +113,10 @@ public function addResult($resultClass, $resultRendererClass)
104
113
}
105
114
106
115
/**
107
- * @param string $logo
116
+ * Add an ASCII art logo to the application. This will be displayed a the top of them menu. It will be
117
+ * automatically padded to sit in the middle.
118
+ *
119
+ * @param string $logo The logo
108
120
*/
109
121
public function setLogo ($ logo )
110
122
{
@@ -113,7 +125,10 @@ public function setLogo($logo)
113
125
}
114
126
115
127
/**
116
- * @param string $colour
128
+ * Modify the foreground color of the workshop menu
129
+ * Can be any of: black, red, green, yellow, blue, magenta, cyan, white
130
+ *
131
+ * @param string $colour The colour
117
132
*/
118
133
public function setFgColour ($ colour )
119
134
{
@@ -122,7 +137,10 @@ public function setFgColour($colour)
122
137
}
123
138
124
139
/**
125
- * @param string $colour
140
+ * Modify the background color of the workshop menu
141
+ * Can be any of: black, red, green, yellow, blue, magenta, cyan, white
142
+ *
143
+ * @param string $colour The colour
126
144
*/
127
145
public function setBgColour ($ colour )
128
146
{
@@ -131,7 +149,10 @@ public function setBgColour($colour)
131
149
}
132
150
133
151
/**
134
- * Run the app
152
+ * Executes the framework, invoking the specified command.
153
+ * The return value is the exit code. 0 for success, anything else is a failure.
154
+ *
155
+ * @return int The exit code
135
156
*/
136
157
public function run ()
137
158
{
0 commit comments