run(); $output = [ 'result' => $result ]; return $this->withJson($response, $output); } public function register(Request $request, Response $response, Updater $updater, $coin_id, $type) { $result = $updater->register($coin_id, $type); $output = [ 'input' => ['coin_id' => $coin_id, 'type' => $type], 'result' => $result ]; return $this->withJson($response, $output); } }