option('from')) ?: now()->subDays(6)->toDateString(); $to = trim((string) $this->option('to')) ?: now()->toDateString(); $limit = max((int) $this->option('limit'), 0); $orders = $repository->references([ 'from' => $from, 'to' => $to, 'shop_names' => [], 'order_no' => '', ], (bool) $this->option('missing-details'), $limit); $this->line(json_encode([ 'from' => $from, 'to' => $to, 'count' => count($orders), 'orders' => $orders, ], JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES)); return self::SUCCESS; } }