get("user_id"); $from_date = date("Y-m-d"); if ($params->exists(["from_date"])) { $from_date = $params->get("from_date"); } $until_date = date("Y-m-d"); if ($params->exists(["until_date"])) { $until_date = $params->get("until_date"); } $stats = getStats($user_id, $from_date, $until_date); $json = new JsonBuilder(); $json->addStats($stats); respondJson($json); } } $branch = new GetStatsBranch(); $branch->execute();