Passed
Push — master ( f87cd0...02e408 )
by
unknown
08:57
created
DependencyInjection/PartFireMangoPayExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         $configuration = new Configuration();
23 23
         $config = $this->processConfiguration($configuration, $configs);
24 24
 
25
-        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
25
+        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
26 26
         $loader->load('services.yml');
27 27
     }
28 28
 }
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
@@ -50,17 +50,21 @@
 block discarded – undo
50 50
         $transfer->setDebitedWalledId($mangoPayTransfer->DebitedWalletId);
51 51
         $transfer->setCreditedWalledId($mangoPayTransfer->CreditedWalletId);
52 52
 
53
-        if (isset($mangoPayTransfer->Fees->Currency))
54
-            $transfer->setFeeCurrency($mangoPayTransfer->Fees->Currency);
53
+        if (isset($mangoPayTransfer->Fees->Currency)) {
54
+                    $transfer->setFeeCurrency($mangoPayTransfer->Fees->Currency);
55
+        }
55 56
 
56
-        if (isset($mangoPayTransfer->Fees->Amount))
57
-            $transfer->setFeeAmount($mangoPayTransfer->Fees->Amount);
57
+        if (isset($mangoPayTransfer->Fees->Amount)) {
58
+                    $transfer->setFeeAmount($mangoPayTransfer->Fees->Amount);
59
+        }
58 60
 
59
-        if (isset($mangoPayTransfer->DebitedFunds->Currency))
60
-            $transfer->setDebitedCurrency($mangoPayTransfer->DebitedFunds->Currency);
61
+        if (isset($mangoPayTransfer->DebitedFunds->Currency)) {
62
+                    $transfer->setDebitedCurrency($mangoPayTransfer->DebitedFunds->Currency);
63
+        }
61 64
 
62
-        if (isset($mangoPayTransfer->DebitedFunds->Amount))
63
-            $transfer->setDebitedAmount($mangoPayTransfer->DebitedFunds->Amount);
65
+        if (isset($mangoPayTransfer->DebitedFunds->Amount)) {
66
+                    $transfer->setDebitedAmount($mangoPayTransfer->DebitedFunds->Amount);
67
+        }
64 68
 
65 69
         return $transfer;
66 70
     }
Please login to merge, or discard this patch.
Models/Adapters/UserQuery.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         Logger $logger,
37 37
         UserTranslator $userTranslator
38 38
     ) {
39
-        parent::__construct($clientId, $clientPassword, $baseUrl,$mangoPayApi, $logger);
39
+        parent::__construct($clientId, $clientPassword, $baseUrl, $mangoPayApi, $logger);
40 40
         $this->userTranslator = $userTranslator;
41 41
     }
42 42
 
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,8 @@
 block discarded – undo
51 51
     }
52 52
 
53 53
     /**
54
-     * @param User $userDto
55
-     * @return User|PartFireException
54
+     * @param UserBase $userDto
55
+     * @return \PartFire\MangoPayBundle\Models\DTOs\UserNatural
56 56
      */
57 57
     public function create(UserBase $userDto)
58 58
     {
Please login to merge, or discard this patch.
Models/Adapters/TransferQuery.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         Logger $logger,
37 37
         UserTranslator $userTranslator
38 38
     ) {
39
-        parent::__construct($clientId, $clientPassword, $baseUrl,$mangoPayApi, $logger);
39
+        parent::__construct($clientId, $clientPassword, $baseUrl, $mangoPayApi, $logger);
40 40
         $this->userTranslator = $userTranslator;
41 41
     }
42 42
 
Please login to merge, or discard this patch.
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
             return new PartFireException($e->getMessage(), $e->getCode());
60
-        } catch(Exception $e) {
60
+        } catch (Exception $e) {
61 61
             $this->logger->addError($e->getMessage());
62 62
             return new PartFireException($e->getMessage(), $e->getCode());
63 63
         }
Please login to merge, or discard this patch.
Models/Adapters/KycDocumentPageQuery.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
             return new PartFireException($e->getMessage(), $e->getCode());
60
-        } catch(Exception $e) {
60
+        } catch (Exception $e) {
61 61
             $this->logger->addError($e->getMessage());
62 62
             return new PartFireException($e->getMessage(), $e->getCode());
63 63
         }
Please login to merge, or discard this patch.
Models/Adapters/KycDocumentQuery.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
         KycDocumentTranslator $kycDocumentTranslator
35 35
     ) {
36 36
         $this->kycDocumentTranslator = $kycDocumentTranslator;
37
-        parent::__construct($clientId, $clientPassword, $baseUrl,$mangoPayApi, $logger);
37
+        parent::__construct($clientId, $clientPassword, $baseUrl, $mangoPayApi, $logger);
38 38
     }
39 39
 
40 40
     public function create(KycDocument $kycDocumentDto, $shouldSubmit = false)
@@ -47,10 +47,10 @@  discard block
 block discarded – undo
47 47
             }
48 48
             $mangoKycDocument = $this->mangoPayApi->Users->CreateKycDocument($UserId, $mangoKycDocument);
49 49
 
50
-        } catch(ResponseException $e) {
50
+        } catch (ResponseException $e) {
51 51
             $this->logger->addCritical($e->getMessage(), ['code' => $e->getCode(), 'details' => $e->GetErrorDetails()]);
52 52
             return new PartFireException($e->getMessage(), $e->getCode());
53
-        } catch(Exception $e) {
53
+        } catch (Exception $e) {
54 54
             $this->logger->addError($e->getMessage());
55 55
             return new PartFireException($e->getMessage(), $e->getCode());
56 56
         }
@@ -66,10 +66,10 @@  discard block
 block discarded – undo
66 66
     {
67 67
         try {
68 68
             $mangoKycDocument = $this->mangoPayApi->Users->GetKycDocument($kycDocumentId);
69
-        } catch(ResponseException $e) {
69
+        } catch (ResponseException $e) {
70 70
             $this->logger->addCritical($e->getMessage(), ['code' => $e->getCode(), 'details' => $e->GetErrorDetails()]);
71 71
             return new PartFireException($e->getMessage(), $e->getCode());
72
-        } catch(Exception $e) {
72
+        } catch (Exception $e) {
73 73
             $this->logger->addError($e->getMessage());
74 74
             return new PartFireException($e->getMessage(), $e->getCode());
75 75
         }
Please login to merge, or discard this patch.
Models/DTOs/UserLegal.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     }
56 56
 
57 57
     /**
58
-     * @param mixed $firstName
58
+     * @param string $firstName
59 59
      */
60 60
     public function setFirstName($firstName)
61 61
     {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
     }
72 72
 
73 73
     /**
74
-     * @param mixed $lastName
74
+     * @param string $lastName
75 75
      */
76 76
     public function setLastName($lastName)
77 77
     {
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     }
88 88
 
89 89
     /**
90
-     * @param mixed $legalRepresentativeBirthday
90
+     * @param integer $legalRepresentativeBirthday
91 91
      */
92 92
     public function setLegalRepresentativeBirthday($legalRepresentativeBirthday)
93 93
     {
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     }
104 104
 
105 105
     /**
106
-     * @param mixed $nationality
106
+     * @param string $nationality
107 107
      */
108 108
     public function setNationality($nationality)
109 109
     {
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     }
120 120
 
121 121
     /**
122
-     * @param mixed $countryOfResidence
122
+     * @param string $countryOfResidence
123 123
      */
124 124
     public function setCountryOfResidence($countryOfResidence)
125 125
     {
Please login to merge, or discard this patch.
Models/DTOs/Translators/UserTranslator.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -15,9 +15,7 @@
 block discarded – undo
15 15
 use MangoPay\UserLegal;
16 16
 use MangoPay\UserNatural;
17 17
 use MangoPay\Address;
18
-
19 18
 use PartFire\MangoPayBundle\MangoPayConstants;
20
-use PartFire\MangoPayBundle\Models\DTOs\UserBase;
21 19
 use PartFire\MangoPayBundle\Models\DTOs\Address as PFAddress;
22 20
 use PartFire\MangoPayBundle\Models\DTOs\UserNatural as PFUserNatural;
23 21
 use PartFire\MangoPayBundle\Models\DTOs\UserLegal as PFUserLegal;
Please login to merge, or discard this patch.