Completed
Pull Request — master (#353)
by
unknown
02:14
created
lib/Payone/Api/Request/Abstract.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     public function __toString()
159 159
     {
160
-        if($this->applyFilters) {
160
+        if ($this->applyFilters) {
161 161
             $result = $this->applyFilters->apply($this->toArray());
162 162
         } else {
163 163
             $protocolFactory     = new Payone_Protocol_Factory();
@@ -415,10 +415,10 @@  discard block
 block discarded – undo
415 415
     
416 416
     public function isFrontendApiCall() 
417 417
     {
418
-        if($this instanceof Payone_Api_Request_Authorization_Abstract) {
418
+        if ($this instanceof Payone_Api_Request_Authorization_Abstract) {
419 419
             $oOrder = Mage::getSingleton('checkout/session')->getQuote();
420 420
             $oPayment = $oOrder->getPayment();
421
-            if($oPayment->getMethod() == 'payone_creditcard_iframe') {
421
+            if ($oPayment->getMethod() == 'payone_creditcard_iframe') {
422 422
                 return true;
423 423
             }
424 424
         }
Please login to merge, or discard this patch.
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -141,8 +141,7 @@  discard block
 block discarded – undo
141 141
                  * @var Payone_Api_Request_Parameter_Interface $data
142 142
                  */
143 143
                 $result = array_merge($result, $data->toArray());
144
-            }
145
-            elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
144
+            } elseif ($data instanceof Payone_Protocol_Service_ApplyFilters == false) {
146 145
                 $result[$key] = $data;
147 146
             }
148 147
         }
@@ -194,8 +193,7 @@  discard block
 block discarded – undo
194 193
 
195 194
                 return $object->get($propertyName);
196 195
             }
197
-        }
198
-        elseif (property_exists($this, $name)) {
196
+        } elseif (property_exists($this, $name)) {
199 197
             return $this->$name;
200 198
         }
201 199
 
@@ -228,8 +226,7 @@  discard block
 block discarded – undo
228 226
 
229 227
                 return $object->set($propertyName, $value);
230 228
             }
231
-        }
232
-        elseif (property_exists($this, $name)) {
229
+        } elseif (property_exists($this, $name)) {
233 230
             $this->$name = $value;
234 231
             return true;
235 232
         }
Please login to merge, or discard this patch.
lib/Payone/Api/Request/Parameter/Abstract.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,8 +69,7 @@
 block discarded – undo
69 69
         {
70 70
             if (!is_array($data) and !is_object($data)) {
71 71
                 $result[$key] = $data;
72
-            }
73
-            else if ($data instanceof Payone_Api_Request_Parameter_Interface) {
72
+            } else if ($data instanceof Payone_Api_Request_Parameter_Interface) {
74 73
                 /**
75 74
                  * @var Payone_Api_Request_Parameter_Interface $data
76 75
                  */
Please login to merge, or discard this patch.
Payone/Api/Request/Parameter/ManageMandate/PaymentMethod/BankAccount.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@
 block discarded – undo
33 33
 class Payone_Api_Request_Parameter_ManageMandate_PaymentMethod_BankAccount
34 34
     extends Payone_Api_Request_Parameter_ManageMandate_PaymentMethod_Abstract
35 35
 {
36
-     /**
37
-     * @var string
38
-     */
36
+        /**
37
+         * @var string
38
+         */
39 39
     protected $bankcountry = NULL;
40 40
     /**
41 41
      * @var string
Please login to merge, or discard this patch.
lib/Payone/Api/Request/Genericpayment.php 1 patch
Indentation   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,6 @@  discard block
 block discarded – undo
12 12
  * Do not edit or add to this file if you wish to upgrade Payone to newer
13 13
  * versions in the future. If you wish to customize Payone for your
14 14
  * needs please refer to http://www.payone.de for more information.
15
-
16 15
  * @category        Payone
17 16
  * @package         Payone_Api
18 17
  * @subpackage      Request
@@ -254,7 +253,7 @@  discard block
 block discarded – undo
254 253
      */
255 254
     function getRatePay()
256 255
     {
257
-       return $this->ratePay;
256
+        return $this->ratePay;
258 257
     }
259 258
 
260 259
     /**
Please login to merge, or discard this patch.
lib/Payone/Api/Request/Vauthorization.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,11 +34,11 @@
 block discarded – undo
34 34
 {
35 35
     protected $request = Payone_Api_Enum_RequestType::VAUTHORIZATION;
36 36
 
37
-     /**
38
-     * Sub account ID
39
-     *
40
-     * @var int
41
-     */
37
+        /**
38
+         * Sub account ID
39
+         *
40
+         * @var int
41
+         */
42 42
     protected $aid = NULL;
43 43
     /**
44 44
      * @var string
Please login to merge, or discard this patch.
lib/Payone/Api/Request/Authorization/Abstract.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -358,9 +358,9 @@  discard block
 block discarded – undo
358 358
 
359 359
         $aHashParams = array();
360 360
         foreach ($aParameters as $sKey => $sValue) {
361
-            if(array_search($sKey, $aFrontendUnsetParams) !== false) {
361
+            if (array_search($sKey, $aFrontendUnsetParams) !== false) {
362 362
                 unset($aParameters[$sKey]);
363
-            } elseif(array_search($sKey, $aFrontendHashParams) !== false || stripos($sKey, '[') !== false) {
363
+            } elseif (array_search($sKey, $aFrontendHashParams) !== false || stripos($sKey, '[') !== false) {
364 364
                 $aHashParams[$sKey] = $sValue;
365 365
             }
366 366
         }
@@ -369,11 +369,11 @@  discard block
 block discarded – undo
369 369
         
370 370
         $sUrlParams = '?';
371 371
         foreach ($aParameters as $sKey => $sValue) {
372
-            $sUrlParams .= $sKey.'='.urlencode($sValue).'&';
372
+            $sUrlParams .= $sKey . '=' . urlencode($sValue) . '&';
373 373
         }
374 374
 
375 375
         $sUrlParams = rtrim($sUrlParams, '&');
376
-        $sFrontendApiUrl = $sFrontendApiUrl.$sUrlParams;
376
+        $sFrontendApiUrl = $sFrontendApiUrl . $sUrlParams;
377 377
 
378 378
         return $sFrontendApiUrl;
379 379
     }
Please login to merge, or discard this patch.
lib/Payone/ClientApi/Request/Abstract.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -189,8 +189,7 @@
 block discarded – undo
189 189
 
190 190
                 return $object->get($propertyName);
191 191
             }
192
-        }
193
-        elseif (property_exists($this, $name)) {
192
+        } elseif (property_exists($this, $name)) {
194 193
             return $this->$name;
195 194
         }
196 195
 
Please login to merge, or discard this patch.
lib/Payone/Protocol/Filter/MaskValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
         }
63 63
 
64 64
         // Calc the char pos to start with
65
-        $start = round(($lengthValue - $numReplaceChars) / 2);
65
+        $start = round(($lengthValue-$numReplaceChars) / 2);
66 66
 
67 67
         // Generate the mask
68 68
         $mask = str_repeat(self::MASK_CHAR, $numReplaceChars);
Please login to merge, or discard this patch.
lib/Payone/Protocol/Service/ApplyFilters.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $stringArray = array();
77 77
 
78 78
         foreach ($objectArray as $key => $value) {
79
-            if($value instanceof Payone_Api_Response_Parameter_Interface){
79
+            if ($value instanceof Payone_Api_Response_Parameter_Interface) {
80 80
                 $stringArray[] = $this->apply($value->toArray());
81 81
             } elseif ($value !== null) {
82 82
                 $filter = $this->getFilterConfig($key);
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
                 }
87 87
             }
88 88
 
89
-            if(is_array($value)) {
89
+            if (is_array($value)) {
90 90
                 foreach ($value as $sArrayKey => $sArrayValue) {
91
-                    $stringArray[] = $key.'_'.$sArrayKey.'='.$sArrayValue;
91
+                    $stringArray[] = $key . '_' . $sArrayKey . '=' . $sArrayValue;
92 92
                 }
93 93
             } else {
94 94
                 $stringArray[] = $key . '=' . $value;
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
     public function setFilters(array $filters)
127 127
     {
128 128
         $this->filters = array();
129
-        foreach($filters as $key => /** @var $value Payone_Protocol_Filter_Interface */ $value)
129
+        foreach ($filters as $key => /** @var $value Payone_Protocol_Filter_Interface */ $value)
130 130
         {
131 131
             $this->addFilter($value);
132 132
         }
@@ -160,8 +160,8 @@  discard block
 block discarded – undo
160 160
      */
161 161
     public function getFilterConfig($key)
162 162
     {
163
-        foreach($this->filters_config as $filter => $config) {
164
-            if(in_array($key, $config)) {
163
+        foreach ($this->filters_config as $filter => $config) {
164
+            if (in_array($key, $config)) {
165 165
                 return $this->getFilter($filter);
166 166
             }
167 167
         }
Please login to merge, or discard this patch.