useOutput($outputInterface) ->only(); } public static function warn($message) { if (!self::$clara) { self::bootstrapOutput(new ConsoleOutput); } self::$clara->warn($message); } public static function info($message) { if (!self::$clara) { self::bootstrapOutput(new ConsoleOutput); } self::$clara->info($message); } public static function debug($message) { if (!self::$clara) { self::bootstrapOutput(new ConsoleOutput); } self::$clara->debug($message); } public static function success($message) { if (!self::$clara) { self::bootstrapOutput(new ConsoleOutput); } self::$clara->success($message); } /** * Return a string representation of a route to output to the console eg [GET] /api/users * @param Route $route * * @return string */ public static function getRouteRepresentation(Route $route): string { $methods = $route->methods(); if (count($methods) > 1) { $methods = array_diff($route->methods(), ['HEAD']); } $routeMethods = implode(',', $methods); $routePath = $route->uri(); return "[$routeMethods] $routePath"; } }