From 46bcae6d4acef7883fd972db49f57a3177333c86 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Mon, 27 May 2019 08:53:32 +0200 Subject: [PATCH] Clean up formatting --- src/Zttp.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Zttp.php b/src/Zttp.php index d1ec255..af6b5ca 100755 --- a/src/Zttp.php +++ b/src/Zttp.php @@ -14,9 +14,9 @@ class PendingZttpRequest { function __construct() { - $this->beforeSendingCallbacks = collect([ function ($request, $options) { + $this->beforeSendingCallbacks = collect(function ($request, $options) { $this->cookies = $options['cookies']; - }]); + }); $this->bodyFormat = 'json'; $this->options = [ 'http_errors' => false, @@ -173,11 +173,11 @@ function delete($url, $params = []) function send($method, $url, $options) { try { - return tap(new ZttpResponse($this->buildClient()->request($method, $url, $this->mergeOptions( - ['query' => $this->parseQueryParams($url)], $options))), - function($response) { - $response->cookies = $this->cookies; - }); + return tap(new ZttpResponse($this->buildClient()->request($method, $url, $this->mergeOptions([ + 'query' => $this->parseQueryParams($url) + ], $options))), function($response) { + $response->cookies = $this->cookies; + }); } catch (\GuzzleHttp\Exception\ConnectException $e) { throw new ConnectionException($e->getMessage(), 0, $e); }