Test Failed
Pull Request — master (#54)
by Lars
02:18
created
QuickPay/API/Client.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         );
78 78
 
79 79
         if (!empty($this->auth_string)) {
80
-            $headers[] = 'Authorization: Basic ' . base64_encode($this->auth_string);
80
+            $headers[] = 'Authorization: Basic '.base64_encode($this->auth_string);
81 81
         }
82 82
 
83 83
         $options = array(
Please login to merge, or discard this patch.
QuickPay/API/Request.php 1 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, http_build_query($form, '', '&'));
163 163
         }
164 164
 
Please login to merge, or discard this patch.
QuickPay/QuickPay.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -14,15 +14,15 @@
 block discarded – undo
14 14
     public $request;
15 15
 
16 16
     /**
17
-    * __construct function.
18
-    *
19
-    * Instantiates the main class.
20
-    * Creates a client which is passed to the request construct.
21
-    *
22
-    * @auth_string string Authentication string for QuickPay
23
-    *
24
-    * @access public
25
-    */
17
+     * __construct function.
18
+     *
19
+     * Instantiates the main class.
20
+     * Creates a client which is passed to the request construct.
21
+     *
22
+     * @auth_string string Authentication string for QuickPay
23
+     *
24
+     * @access public
25
+     */
26 26
     public function __construct($auth_string = '')
27 27
     {
28 28
         $client = new Client($auth_string);
Please login to merge, or discard this patch.
Tests/api/RequestTest.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
      * @param array $a
99 99
      * @param string $b
100 100
      * @param int $c
101
-     * @return bool|string
101
+     * @return false|string
102 102
      */
103 103
     public function handleArrayData($a, $b = '', $c=0)
104 104
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -100,14 +100,14 @@  discard block
 block discarded – undo
100 100
      * @param int $c
101 101
      * @return bool|string
102 102
      */
103
-    public function handleArrayData($a, $b = '', $c=0)
103
+    public function handleArrayData($a, $b = '', $c = 0)
104 104
     {
105 105
         if (!is_array($a)) {
106 106
             return false;
107 107
         }
108
-        foreach ((array)$a as $k => $v) {
108
+        foreach ((array) $a as $k => $v) {
109 109
             if ($c) {
110
-                if(is_numeric($k)) {
110
+                if (is_numeric($k)) {
111 111
                     $k = $b."[]";
112 112
                 } else {
113 113
                     $k = $b."[$k]";
@@ -118,8 +118,8 @@  discard block
 block discarded – undo
118 118
                 }
119 119
             }
120 120
 
121
-            if (is_array($v)||is_object($v)) {
122
-                $r[] = $this->crpost($v,$k,1);
121
+            if (is_array($v) || is_object($v)) {
122
+                $r[] = $this->crpost($v, $k, 1);
123 123
                 continue;
124 124
             }
125 125
             $r[] = urlencode($k)."=".urlencode($v);
Please login to merge, or discard this patch.