Passed
Push — master ( b111b6...d62ebd )
by
unknown
01:46
created
QuickPay/API/Request.php 2 patches
Doc Comments   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,6 +27,7 @@  discard block
 block discarded – undo
27 27
      * Instantiates the object
28 28
      *
29 29
      * @access public
30
+     * @param Client $client
30 31
      */
31 32
     public function __construct($client)
32 33
     {
@@ -67,6 +68,7 @@  discard block
 block discarded – undo
67 68
      * Performs an API POST request
68 69
      *
69 70
      * @access public
71
+     * @param string $path
70 72
      * @return Response
71 73
      */
72 74
     public function post($path, $form = array())
@@ -195,7 +197,7 @@  discard block
 block discarded – undo
195 197
      * Kept public for testing purposes.
196 198
      *
197 199
      * @param array $query
198
-     * @return mixed|string
200
+     * @return string
199 201
      */
200 202
     public function httpBuildQuery($query)
201 203
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
         // Add query parameters to $path?
49 49
         if (!empty($query)) {
50 50
             if (strpos($path, '?') === false) {
51
-                $path .= '?' . http_build_query($query, '', '&');
51
+                $path .= '?'.http_build_query($query, '', '&');
52 52
             } else {
53
-                $path .= ini_get('arg_separator.output') . http_build_query($query, '', '&');
53
+                $path .= ini_get('arg_separator.output').http_build_query($query, '', '&');
54 54
             }
55 55
         }
56 56
 
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      */
140 140
     protected function setUrl($params)
141 141
     {
142
-        curl_setopt($this->client->ch, CURLOPT_URL, Constants::API_URL . trim($params, '/'));
142
+        curl_setopt($this->client->ch, CURLOPT_URL, Constants::API_URL.trim($params, '/'));
143 143
     }
144 144
 
145 145
     /**
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         curl_setopt($this->client->ch, CURLOPT_CUSTOMREQUEST, $request_type);
159 159
 
160 160
         // If additional data is delivered, we will send it along with the API request
161
-        if (is_array($form) && ! empty($form)) {
161
+        if (is_array($form) && !empty($form)) {
162 162
             curl_setopt($this->client->ch, CURLOPT_POSTFIELDS, $this->httpBuildQuery($form, '', '&'));
163 163
         }
164 164
 
Please login to merge, or discard this patch.
Tests/api/RequestTest.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@
 block discarded – undo
8 8
 
9 9
 class RequestTest extends \PHPUnit_Framework_TestCase
10 10
 {
11
-	/**
12
-	 * @var Client
13
-	 */
11
+    /**
12
+     * @var Client
13
+     */
14 14
     protected $client;
15 15
 
16
-	/**
17
-	 * @var Request
18
-	 */
16
+    /**
17
+     * @var Request
18
+     */
19 19
     protected $request;
20 20
 
21 21
     public function setUp()
Please login to merge, or discard this patch.
QuickPay/API/Client.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
             'Accept: application/json',
64 64
         );
65 65
         if (!empty($this->auth_string)) {
66
-            $this->headers[] = 'Authorization: Basic ' . base64_encode($this->auth_string);
66
+            $this->headers[] = 'Authorization: Basic '.base64_encode($this->auth_string);
67 67
         }
68 68
 
69 69
         // Add custom headers and set headers in cURL object.
Please login to merge, or discard this patch.