Passed
Push — 2.3 ( b8e083...902719 )
by Alexander
01:37
created
Block/Adminhtml/System/Config/Checker.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
      */
68 68
     public function getButtonHtml()
69 69
     {
70
-        $buttonData = ['id' => 'b2binpay_check_button', 'label' => __('Check Auth')];
70
+        $buttonData = [ 'id' => 'b2binpay_check_button', 'label' => __('Check Auth') ];
71 71
         $button = $this->getLayout()->createBlock('Magento\Backend\Block\Widget\Button')->setData($buttonData);
72 72
 
73 73
         return $button->toHtml();
Please login to merge, or discard this patch.
Block/Adminhtml/Form/Field/Wallets.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
      */
13 13
     protected function _prepareToRender()
14 14
     {
15
-        $this->addColumn('wallet', ['label' => __('Wallet ID'), 'class' => 'required-entry b2binpay-wallet']);
16
-        $this->addColumn('currency', ['label' => __('Currency [store]'), 'class' => 'required-entry']);
15
+        $this->addColumn('wallet', [ 'label' => __('Wallet ID'), 'class' => 'required-entry b2binpay-wallet' ]);
16
+        $this->addColumn('currency', [ 'label' => __('Currency [store]'), 'class' => 'required-entry' ]);
17 17
         $this->_addAfter = false;
18 18
         $this->_addButtonLabel = __('Add Wallet');
19 19
     }
Please login to merge, or discard this patch.
Controller/Callback/Index.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -68,24 +68,24 @@  discard block
 block discarded – undo
68 68
         $request = $this->context->getRequest();
69 69
         $result = $this->rawResultFactory->create();
70 70
 
71
-        $validationResult = $this->validator->validate(['request' => $request]);
71
+        $validationResult = $this->validator->validate([ 'request' => $request ]);
72 72
 
73 73
         $validation = $validationResult->getFailsDescription();
74 74
 
75 75
         if (!$validationResult->isValid()) {
76
-            $result->setStatusHeader($validation['status'], '1.1', $validation['message']);
76
+            $result->setStatusHeader($validation[ 'status' ], '1.1', $validation[ 'message' ]);
77 77
 
78 78
             return $result;
79 79
         }
80 80
 
81
-        $order = $validation['order'];
81
+        $order = $validation[ 'order' ];
82 82
         $payment = $order->getPayment();
83 83
         $params = $request->getParams();
84 84
 
85
-        $billStatus = (string)$params['status'];
85
+        $billStatus = (string)$params[ 'status' ];
86 86
 
87 87
         if ('2' === $billStatus) {
88
-            if ($params['amount'] === $params['actual_amount']) {
88
+            if ($params[ 'amount' ] === $params[ 'actual_amount' ]) {
89 89
                 $totalDue = $order->getTotalDue();
90 90
 
91 91
                 $payment->authorize(false, $totalDue);
@@ -97,24 +97,24 @@  discard block
 block discarded – undo
97 97
                 );
98 98
             } else {
99 99
                 $actualAmount = $this->amountFactory->create(
100
-                    $params['actual_amount'],
101
-                    $params['currency']['iso'],
102
-                    $params['pow']
100
+                    $params[ 'actual_amount' ],
101
+                    $params[ 'currency' ][ 'iso' ],
102
+                    $params[ 'pow' ]
103 103
                 )->getValue();
104 104
 
105 105
                 $order->addStatusToHistory(
106 106
                     $order::STATE_PAYMENT_REVIEW,
107
-                    __('B2BinPay received payment: ' . $actualAmount . $params['currency']['alpha'])
107
+                    __('B2BinPay received payment: ' . $actualAmount . $params[ 'currency' ][ 'alpha' ])
108 108
                 );
109 109
             }
110 110
         }
111 111
 
112 112
         $stateList = $this->getStateDesc();
113 113
 
114
-        if (!empty($stateList[$billStatus])) {
114
+        if (!empty($stateList[ $billStatus ])) {
115 115
             $order->addStatusToHistory(
116
-                $stateList[$billStatus]['state'],
117
-                $stateList[$billStatus]['message']
116
+                $stateList[ $billStatus ][ 'state' ],
117
+                $stateList[ $billStatus ][ 'message' ]
118 118
             );
119 119
         }
120 120
 
Please login to merge, or discard this patch.
Gateway/Command/AuthorizationCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,8 +55,8 @@
 block discarded – undo
55 55
      */
56 56
     public function execute(array $commandSubject)
57 57
     {
58
-        $storeAmount = $commandSubject['amount'];
59
-        $paymentDO = $commandSubject['payment'];
58
+        $storeAmount = $commandSubject[ 'amount' ];
59
+        $paymentDO = $commandSubject[ 'payment' ];
60 60
 
61 61
         $payment = $paymentDO->getPayment();
62 62
         $order = $payment->getOrder();
Please login to merge, or discard this patch.
Gateway/Validator/CallbackValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function validate(array $validationSubject)
51 51
     {
52
-        $auth = $validationSubject['request']->getHeader('Authorization');
52
+        $auth = $validationSubject[ 'request' ]->getHeader('Authorization');
53 53
 
54 54
         if (empty($auth)) {
55 55
             return $this->createResult(
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             );
62 62
         }
63 63
 
64
-        $trackingId = $validationSubject['request']->getParam('tracking_id');
64
+        $trackingId = $validationSubject[ 'request' ]->getParam('tracking_id');
65 65
 
66 66
         if (empty($trackingId)) {
67 67
             return $this->createResult(
Please login to merge, or discard this patch.
Model/System/Config/Backend/Wallets.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
         WalletsHelper $walletsHelper,
39 39
         AbstractResource $resource = null,
40 40
         AbstractDb $resourceCollection = null,
41
-        array $data = []
41
+        array $data = [ ]
42 42
     ) {
43 43
         $this->walletsHelper = $walletsHelper;
44 44
         parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data);
Please login to merge, or discard this patch.
Helper/Wallets.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
         if (!is_array($value)) {
19 19
             return false;
20 20
         }
21
-        unset($value['__empty']);
21
+        unset($value[ '__empty' ]);
22 22
         foreach ($value as $row) {
23 23
             if (!is_array($row)
24 24
                 || !array_key_exists('wallet', $row)
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
         if (!is_array($value)) {
42 42
             return null;
43 43
         }
44
-        $result = [];
44
+        $result = [ ];
45 45
         foreach ($value as $wallet => $currency) {
46
-            $result[] = ['wallet' => $wallet, 'currency' => $currency];
46
+            $result[ ] = [ 'wallet' => $wallet, 'currency' => $currency ];
47 47
         }
48 48
         return $result;
49 49
     }
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
      */
57 57
     protected function decodeArrayFieldValue(array $value)
58 58
     {
59
-        $result = [];
60
-        unset($value['__empty']);
59
+        $result = [ ];
60
+        unset($value[ '__empty' ]);
61 61
         foreach ($value as $row) {
62
-            $wallet = $row['wallet'];
63
-            $currency = $row['currency'];
64
-            $result[$wallet] = $currency;
62
+            $wallet = $row[ 'wallet' ];
63
+            $currency = $row[ 'currency' ];
64
+            $result[ $wallet ] = $currency;
65 65
         }
66 66
         return $result;
67 67
     }
Please login to merge, or discard this patch.