protected function formatTask($event)
    {
        if ($event instanceof CallbackEvent) {
            return [
                'type' => 'closure',
                'name' => 'Closure',
            ];
        }

        if (Str::contains($event->command, '\'artisan\'')) {
            $exploded = explode(' ', $event->command);

            return [
                'type' => 'artisan',
                'name' => 'artisan '.implode(' ', array_slice($exploded, 2)),
            ];
        }

        return [
            'type' => 'command',
            'name' => $event->command,
        ];
    }
protected function formatTask($event)
    {
        if ($event instanceof CallbackEvent) {
            return [
                'type' => 'closure',
                'name' => 'Closure',
            ];
        }

        if (Str::contains($event->command, '\'artisan\'')) {
            $exploded = explode(' ', $event->command);

            return [
                'type' => 'artisan',
                'name' => 'artisan '.implode(' ', array_slice($exploded, 2)),
            ];
        }

        return [
            'type' => 'command',
            'name' => $event->command,
        ];
    }
protected function formatTask ( $ event ) { if ( $ event instanceof CallbackEvent ) { return [ 'type' => 'closure' , 'name' => 'Closure' , ] ; } if ( Str :: contains ( $ event -> command , '\'artisan\'' ) ) { $ exploded = explode ( ' ' , $ event -> command ) ; return [ 'type' => 'artisan' , 'name' => 'artisan ' . implode ( ' ' , array_slice ( $ exploded , 2 ) ) , ] ; } return [ 'type' => 'command' , 'name' => $ event -> command , ] ; }
Format a giving task.

@param $event

@return array
Format a giving task .