Completed
Pull Request — master (#114)
by Florian
03:20
created
Service/V1/InstallmentPlan.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -135,9 +135,9 @@  discard block
 block discarded – undo
135 135
     {
136 136
         $sErrorMessage = false;
137 137
         if (isset($aResponsePreCheck['status']) && $aResponsePreCheck['status'] == 'ERROR') {
138
-            $sErrorMessage = __($aResponsePreCheck['errorcode'] . ' - ' . $aResponsePreCheck['customermessage']);
138
+            $sErrorMessage = __($aResponsePreCheck['errorcode'].' - '.$aResponsePreCheck['customermessage']);
139 139
         } elseif (isset($aResponseCalculation['status']) && $aResponseCalculation['status'] == 'ERROR') {
140
-            $sErrorMessage = __($aResponseCalculation['errorcode'] . ' - ' . $aResponseCalculation['customermessage']);
140
+            $sErrorMessage = __($aResponseCalculation['errorcode'].' - '.$aResponseCalculation['customermessage']);
141 141
         } elseif (!$aResponsePreCheck || (isset($aResponsePreCheck['status']) && $aResponsePreCheck['status'] == 'OK' && !$aResponseCalculation)) {
142 142
             $sErrorMessage = __('An unknown error occurred');
143 143
         }
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
     public function getPayDataArray($aResponse)
190 190
     {
191 191
         $aPayData = array();
192
-        foreach($aResponse as $sKey => $sValue) {
192
+        foreach ($aResponse as $sKey => $sValue) {
193 193
             $sCorrectedKey = str_ireplace('add_paydata[', '', $sKey);
194 194
             $sCorrectedKey = rtrim($sCorrectedKey, ']');
195 195
             $sCorrectedKey = strtolower($sCorrectedKey);
@@ -214,18 +214,18 @@  discard block
 block discarded – undo
214 214
         $aPayData = $this->getPayDataArray($aResponse);
215 215
         foreach ($aPayData as $sKey => $sValue) {
216 216
             $aSplit = explode('_', $sKey);
217
-            for($i = count($aSplit); $i > 0; $i--) {
218
-                if($i == count($aSplit)) {
219
-                    $aTmp = array($aSplit[$i-1] => $sValue);
217
+            for ($i = count($aSplit); $i > 0; $i--) {
218
+                if ($i == count($aSplit)) {
219
+                    $aTmp = array($aSplit[$i - 1] => $sValue);
220 220
                 } else {
221
-                    $aTmp = array($aSplit[$i-1] => $aTmp);
221
+                    $aTmp = array($aSplit[$i - 1] => $aTmp);
222 222
                 }
223 223
             }
224 224
 
225 225
             $aInstallmentData = array_replace_recursive($aInstallmentData, $aTmp);
226 226
         }
227 227
 
228
-        if(isset($aInstallmentData['paymentdetails']) && count($aInstallmentData['paymentdetails']) > 0) {
228
+        if (isset($aInstallmentData['paymentdetails']) && count($aInstallmentData['paymentdetails']) > 0) {
229 229
             return $aInstallmentData['paymentdetails'];
230 230
         }
231 231
 
Please login to merge, or discard this patch.
Model/Api/Request/Base.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -268,7 +268,6 @@
 block discarded – undo
268 268
 
269 269
     /**
270 270
      * Send the previously prepared request, log request and response into the database and return the response
271
-
272 271
      * @param  PayoneMethod $oPayment
273 272
      * @return array
274 273
      */
Please login to merge, or discard this patch.
Observer/Transactionstatus/Paid.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
 
89 89
         // order is not guaranteed to exist if using transaction status forwarding
90 90
         // advance payment should not create an invoice
91
-        if (null === $oOrder || $oOrder->getPayment()->getMethodInstance()->getCode() == PayoneConfig::METHOD_ADVANCE_PAYMENT){
91
+        if (null === $oOrder || $oOrder->getPayment()->getMethodInstance()->getCode() == PayoneConfig::METHOD_ADVANCE_PAYMENT) {
92 92
             return;
93 93
         }
94 94
 
Please login to merge, or discard this patch.
Test/Unit/Helper/RequestTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,6 @@
 block discarded – undo
36 36
 use Payone\Core\Helper\Environment;
37 37
 use Payone\Core\Helper\Shop;
38 38
 use Payone\Core\Model\PayoneConfig;
39
-use Locale;
40 39
 use Payone\Core\Model\Test\BaseTestCase;
41 40
 use Payone\Core\Model\Test\PayoneObjectManager;
42 41
 
Please login to merge, or discard this patch.
Test/Unit/Model/Api/InvoiceTest.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -27,13 +27,11 @@
 block discarded – undo
27 27
 namespace Payone\Core\Test\Unit\Model\Api;
28 28
 
29 29
 use Payone\Core\Model\Api\Invoice as ClassToTest;
30
-use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
31 30
 use Payone\Core\Helper\Toolkit;
32 31
 use Payone\Core\Model\Api\Request\Authorization;
33 32
 use Magento\Sales\Model\Order;
34 33
 use Magento\Sales\Model\Order\Item;
35 34
 use Payone\Core\Model\Test\BaseTestCase;
36
-use Payone\Core\Model\Test\PayoneObjectManager;
37 35
 
38 36
 class InvoiceTest extends BaseTestCase
39 37
 {
Please login to merge, or discard this patch.
Test/Unit/Model/Api/Request/AddresscheckTest.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -28,12 +28,10 @@
 block discarded – undo
28 28
 
29 29
 use Magento\Quote\Model\Quote\Address;
30 30
 use Payone\Core\Model\Api\Request\Addresscheck as ClassToTest;
31
-use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
32 31
 use Payone\Core\Helper\Api;
33 32
 use Payone\Core\Model\ResourceModel\CheckedAddresses;
34 33
 use Payone\Core\Helper\Shop;
35 34
 use Payone\Core\Model\Test\BaseTestCase;
36
-use Payone\Core\Model\Test\PayoneObjectManager;
37 35
 
38 36
 class AddresscheckTest extends BaseTestCase
39 37
 {
Please login to merge, or discard this patch.
Test/Unit/Model/Api/Request/ConsumerscoreTest.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -30,14 +30,12 @@
 block discarded – undo
30 30
 use Magento\Quote\Model\Quote\Address;
31 31
 use Payone\Core\Helper\Database;
32 32
 use Payone\Core\Model\Api\Request\Consumerscore as ClassToTest;
33
-use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
34 33
 use Payone\Core\Helper\Api;
35 34
 use Payone\Core\Helper\Shop;
36 35
 use Payone\Core\Model\ResourceModel\CheckedAddresses;
37 36
 use Payone\Core\Model\Source\AddressCheckType;
38 37
 use Payone\Core\Model\Source\CreditratingCheckType;
39 38
 use Payone\Core\Model\Test\BaseTestCase;
40
-use Payone\Core\Model\Test\PayoneObjectManager;
41 39
 
42 40
 class ConsumerscoreTest extends BaseTestCase
43 41
 {
Please login to merge, or discard this patch.
Test/Unit/Observer/CheckoutSubmitBeforeTest.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,6 @@
 block discarded – undo
38 38
 use Magento\Payment\Model\InfoInterface;
39 39
 use Magento\Framework\Exception\LocalizedException;
40 40
 use Magento\Framework\Event\Observer;
41
-use Magento\Store\Model\ScopeInterface;
42 41
 use Payone\Core\Model\Test\BaseTestCase;
43 42
 use Payone\Core\Model\Test\PayoneObjectManager;
44 43
 
Please login to merge, or discard this patch.
Test/Unit/Service/V1/AddresscheckTest.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -27,13 +27,11 @@
 block discarded – undo
27 27
 namespace Payone\Core\Test\Unit\Service\V1\Data;
28 28
 
29 29
 use Payone\Core\Service\V1\Addresscheck as ClassToTest;
30
-use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
31 30
 use Payone\Core\Model\Risk\Addresscheck;
32 31
 use Magento\Quote\Api\Data\AddressInterface;
33 32
 use Payone\Core\Service\V1\Data\AddresscheckResponse;
34 33
 use Payone\Core\Service\V1\Data\AddresscheckResponseFactory;
35 34
 use Payone\Core\Model\Test\BaseTestCase;
36
-use Payone\Core\Model\Test\PayoneObjectManager;
37 35
 
38 36
 class AddresscheckTest extends BaseTestCase
39 37
 {
Please login to merge, or discard this patch.