Skip to content

Commit

Permalink
Defining the default value in the map function
Browse files Browse the repository at this point in the history
  • Loading branch information
guilhermecotaGn committed Mar 19, 2021
1 parent 2d159af commit 69a7b3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Gerencianet/Endpoints.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 69a7b3c

Please # to comment.