From a13fbdc3578b0725fd609fddc5f5e5b0fb548ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Og=C3=BCn=20KARAKU=C5=9E?= Date: Wed, 23 Apr 2014 13:10:50 +0300 Subject: [PATCH] code styling fixed --- library/Requests/Session.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/library/Requests/Session.php b/library/Requests/Session.php index bdcb1dd6b..f519d8dc3 100755 --- a/library/Requests/Session.php +++ b/library/Requests/Session.php @@ -81,8 +81,9 @@ public function __construct($url = null, $headers = array(), $data = array(), $o * @return mixed|null Property value, null if none found */ public function __get($key) { - if (isset($this->options[$key])) + if (isset($this->options[$key])) { return $this->options[$key]; + } return null; } @@ -112,7 +113,9 @@ public function __isset($key) { * @param string $key Property key */ public function __unset($key) { - $this->options[$key] = null; + if (isset($this->options[$key])) { + unset($this->options[$key]); + } } /**#@+ @@ -236,6 +239,7 @@ protected function merge_request($request, $merge_options = true) { $request['url'] = Requests_IRI::absolutize($this->url, $request['url']); $request['url'] = $request['url']->uri; } + $request['headers'] = array_merge($this->headers, $request['headers']); if (is_array($request['data']) && is_array($this->data)) { @@ -248,6 +252,7 @@ protected function merge_request($request, $merge_options = true) { // Disallow forcing the type, as that's a per request setting unset($request['options']['type']); } + return $request; } -} \ No newline at end of file +}