From 69a7b3c69472978de03323f15bffc7596ed8a519 Mon Sep 17 00:00:00 2001 From: Guilherme Cota Date: Fri, 19 Mar 2021 13:58:06 -0300 Subject: [PATCH] Defining the default value in the map function --- src/Gerencianet/Endpoints.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Gerencianet/Endpoints.php b/src/Gerencianet/Endpoints.php index ffd2556..98332d1 100644 --- a/src/Gerencianet/Endpoints.php +++ b/src/Gerencianet/Endpoints.php @@ -57,7 +57,7 @@ public static function __callStatic($method, $args) private function map() { $this->methods = array_map(function ($endpoint) { - return function ($params, $body) use ($endpoint) { + return function ($params = [], $body = []) use ($endpoint) { $route = $this->getRoute($endpoint, $params); $query = $this->getQueryString($params); $route .= $query;