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()
184184 */
185185 protected function complete ($ message = '' )
186186 {
187+ $ message = $ this ->stringFromMessage ($ message );
187188 $ this ->output ->success ($ message );
188189 $ this ->commandRecord ()->complete ($ message );
189190
@@ -198,12 +199,28 @@ protected function complete($message = '')
198199 */
199200 protected function fail ($ message = '' )
200201 {
202+ $ message = $ this ->stringFromMessage ($ message );
201203 $ this ->output ->error ($ message );
202204 $ this ->commandRecord ()->fail ($ message );
203205
204206 return false ;
205207 }
206208
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+
207224 /**
208225 * The custom monitored command functionality.
209226 *
You can’t perform that action at this time.
0 commit comments