File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,7 @@ protected function hasRunTooManyTimes()
184
184
*/
185
185
protected function complete ($ message = '' )
186
186
{
187
+ $ message = $ this ->stringFromMessage ($ message );
187
188
$ this ->output ->success ($ message );
188
189
$ this ->commandRecord ()->complete ($ message );
189
190
@@ -198,12 +199,28 @@ protected function complete($message = '')
198
199
*/
199
200
protected function fail ($ message = '' )
200
201
{
202
+ $ message = $ this ->stringFromMessage ($ message );
201
203
$ this ->output ->error ($ message );
202
204
$ this ->commandRecord ()->fail ($ message );
203
205
204
206
return false ;
205
207
}
206
208
209
+ /**
210
+ * Get a string representation of the command return value.
211
+ *
212
+ * @param mixed $message
213
+ * @return string
214
+ */
215
+ protected function stringFromMessage ($ message )
216
+ {
217
+ if (is_string ($ message )) {
218
+ return $ message ;
219
+ }
220
+
221
+ return var_export ($ message , true );
222
+ }
223
+
207
224
/**
208
225
* The custom monitored command functionality.
209
226
*
You can’t perform that action at this time.
0 commit comments