Passed
Push — master ( ffec38...d087b3 )
by
unknown
02:56
created
Models/Adapters/WalletQuery.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         Logger $logger,
46 46
         WalletTranslator $walletTranslator
47 47
     ) {
48
-        parent::__construct($clientId, $clientPassword, $baseUrl,$mangoPayApi, $logger);
48
+        parent::__construct($clientId, $clientPassword, $baseUrl, $mangoPayApi, $logger);
49 49
         $this->walletTranslator = $walletTranslator;
50 50
     }
51 51
 
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
         $mangoWallet = $this->walletTranslator->convertDTOToMangoPayWallet($walletDto);
55 55
         try {
56 56
             $mangoWallet = $this->mangoPayApi->Wallets->Create($mangoWallet);
57
-        } catch(ResponseException $e) {
57
+        } catch (ResponseException $e) {
58 58
             $this->logger->addCritical($e->getMessage(), ['code' => $e->getCode(), 'details' => $e->GetErrorDetails()]);
59 59
             throw new PartFireException($e->getMessage(), $e->getCode());
60
-        } catch(Exception $e) {
60
+        } catch (Exception $e) {
61 61
             $this->logger->addError($e->getMessage());
62 62
             throw new PartFireException($e->getMessage(), $e->getCode());
63 63
         }
Please login to merge, or discard this patch.
Models/DTOs/Translators/TransferTranslator.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -53,17 +53,21 @@
 block discarded – undo
53 53
         $transfer->setResultCode($mangoPayTransfer->ResultCode);
54 54
         $transfer->setResultMessage($mangoPayTransfer->ResultMessage);
55 55
 
56
-        if (isset($mangoPayTransfer->Fees->Currency))
57
-            $transfer->setFeeCurrency($mangoPayTransfer->Fees->Currency);
56
+        if (isset($mangoPayTransfer->Fees->Currency)) {
57
+                    $transfer->setFeeCurrency($mangoPayTransfer->Fees->Currency);
58
+        }
58 59
 
59
-        if (isset($mangoPayTransfer->Fees->Amount))
60
-            $transfer->setFeeAmount($mangoPayTransfer->Fees->Amount);
60
+        if (isset($mangoPayTransfer->Fees->Amount)) {
61
+                    $transfer->setFeeAmount($mangoPayTransfer->Fees->Amount);
62
+        }
61 63
 
62
-        if (isset($mangoPayTransfer->DebitedFunds->Currency))
63
-            $transfer->setDebitedCurrency($mangoPayTransfer->DebitedFunds->Currency);
64
+        if (isset($mangoPayTransfer->DebitedFunds->Currency)) {
65
+                    $transfer->setDebitedCurrency($mangoPayTransfer->DebitedFunds->Currency);
66
+        }
64 67
 
65
-        if (isset($mangoPayTransfer->DebitedFunds->Amount))
66
-            $transfer->setDebitedAmount($mangoPayTransfer->DebitedFunds->Amount);
68
+        if (isset($mangoPayTransfer->DebitedFunds->Amount)) {
69
+                    $transfer->setDebitedAmount($mangoPayTransfer->DebitedFunds->Amount);
70
+        }
67 71
 
68 72
         return $transfer;
69 73
     }
Please login to merge, or discard this patch.
MangoPayConstants.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
     // Hook Variables
75 75
     // https://docs.mangopay.com/endpoints/v2.01/hooks#e246_the-hook-object
76 76
     const       HOOK_EVENT_TYPE                     = "EventType";
77
-    const       HOOK_RESOURCE_ID                    = "RessourceId";  // Known spelling mistake in MangoPay Api
77
+    const       HOOK_RESOURCE_ID                    = "RessourceId"; // Known spelling mistake in MangoPay Api
78 78
     const       HOOK_DATE                           = "Date";
79 79
 
80 80
     // Event types
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -329,6 +329,9 @@
 block discarded – undo
329 329
         return self::isEventType("PREAUTHORIZATION_", $eventType);
330 330
     }
331 331
 
332
+    /**
333
+     * @param string $compareToEvent
334
+     */
332 335
     private static function isEventType($compareToEvent, $eventName)
333 336
     {
334 337
         $compareToEventLength = strlen($compareToEvent);
Please login to merge, or discard this patch.
Models/Adapters/AbstractQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     public function __construct($clientId, $clientPassword, $baseUrl, MangoPayApi $mangoPayApi, Logger $logger)
31 31
     {
32 32
         $this->logger = $logger;
33
-        $path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR. '..' . DIRECTORY_SEPARATOR. '..' . DIRECTORY_SEPARATOR. '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR. 'var/logs/mangopay.log';
33
+        $path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'var/logs/mangopay.log';
34 34
         $this->logger->pushHandler(new StreamHandler($path, Logger::DEBUG));
35 35
 
36 36
         $this->mangoPayApi = $mangoPayApi;
Please login to merge, or discard this patch.
Models/Adapters/PayInQuery.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -75,10 +75,10 @@
 block discarded – undo
75 75
                     return $this->payInTranslator->translateMangoPayBankwireDirectPayInToDto($createdPayIn);
76 76
                 }
77 77
                 $this->logger->addCritical(
78
-                    "Pay-In has been created with status: ".$createdPayIn->Status . ' (result code: ' . $createdPayIn->ResultCode . ')'
78
+                    "Pay-In has been created with status: " . $createdPayIn->Status . ' (result code: ' . $createdPayIn->ResultCode . ')'
79 79
                 );
80 80
                 throw new PartFireException(
81
-                    "Pay-In has been created with status: ".$createdPayIn->Status . ' (result code: ' . $createdPayIn->ResultCode . ')'
81
+                    "Pay-In has been created with status: " . $createdPayIn->Status . ' (result code: ' . $createdPayIn->ResultCode . ')'
82 82
                 );
83 83
             }
84 84
             $this->logger->addCritical("Failed to create PayIn");
Please login to merge, or discard this patch.