Skip to content

Commit

Permalink
refractor: add default value
Browse files Browse the repository at this point in the history
  • Loading branch information
xchopin committed Jul 16, 2019
1 parent f219090 commit fb1524b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/OpenLRW.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ public static function serverStatus()



/**
* Creates a JSON Web Token
*
* @return mixed|\Psr\Http\Message\ResponseInterface
* @throws GenericException
* @throws \Exception
*/
/**
* Creates a JSON Web Token
*
* @return mixed|\Psr\Http\Message\ResponseInterface
* @throws GenericException
* @throws \Exception
*/
public static function generateJwt()
{
$route = 'api/auth/login';
Expand Down Expand Up @@ -142,9 +142,9 @@ public static function httpDelete($route, $header)
return self::$http->delete($route, $header);
}

public static function httpPost($route, $data, $header)
public static function httpPost(string $route, array $json, array $header = ['X-Requested-With' => 'XMLHttpRequest', 'Content-Type' => 'application/json'])
{
return self::$http->post($route, $data, $header);
return self::$http->post($route, $json, $header);
}

public static function httpPatch($route, $data, $header)
Expand Down

0 comments on commit fb1524b

Please sign in to comment.