Passed
Pull Request — master (#23)
by
unknown
01:11
created
src/Method/ResultObjectMapper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
     {
74 74
         $parts = explode('_', $field);
75 75
         array_map('ucfirst', $parts);
76
-        $name = 'set' . implode('', $parts);
76
+        $name = 'set'.implode('', $parts);
77 77
 
78 78
         return $name;
79 79
     }
Please login to merge, or discard this patch.
src/Method/ResultObject.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     private function classGetters($class)
107 107
     {
108 108
         $methods = get_class_methods($class);
109
-        return array_filter($methods, function ($value) use ($methods) {
109
+        return array_filter($methods, function($value) use ($methods) {
110 110
             if ($value == 'getErrors') {
111 111
                 return false;
112 112
             }
@@ -134,6 +134,6 @@  discard block
 block discarded – undo
134 134
         $parts = array_map('ucfirst', $parts);
135 135
         $property = implode('', $parts);
136 136
 
137
-        return 'set' . ucfirst($property);
137
+        return 'set'.ucfirst($property);
138 138
     }
139 139
 }
Please login to merge, or discard this patch.
src/Exception/InvalidAttributeValue.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
     public function __construct($message, ConstraintViolationListInterface $violations)
13 13
     {
14
-        $message .= ' Violations: ' . $violations->__toString();
14
+        $message .= ' Violations: '.$violations->__toString();
15 15
         parent::__construct($message);
16 16
 
17 17
         $this->violations = $violations;
Please login to merge, or discard this patch.
src/Exception/Request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      */
16 16
     public function __construct(\Exception $previous = null, ResultObjectInterface $result = null)
17 17
     {
18
-        $this->message .= ' Response data: ' . serialize($result);
18
+        $this->message .= ' Response data: '.serialize($result);
19 19
         parent::__construct($this->message, $this->code, $previous);
20 20
 
21 21
         $this->result = $result;
Please login to merge, or discard this patch.
src/Method/Payment/Create.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -174,9 +174,15 @@
 block discarded – undo
174 174
                 'message' => 'The value {{ value }} is not a valid {{ type }}.'
175 175
             ]),
176 176
         ];
177
-        if ($isRequired) array_unshift($inside_array, new Assert\NotBlank());
178
-        if ($length) array_push($inside_array, new Assert\Length($length));
179
-        if ($args) array_push($inside_array, $args);
177
+        if ($isRequired) {
178
+            array_unshift($inside_array, new Assert\NotBlank());
179
+        }
180
+        if ($length) {
181
+            array_push($inside_array, new Assert\Length($length));
182
+        }
183
+        if ($args) {
184
+            array_push($inside_array, $args);
185
+        }
180 186
         
181 187
         return $isRequired 
182 188
             ? new Assert\Required($inside_array)
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,12 +43,12 @@  discard block
 block discarded – undo
43 43
     {
44 44
         return new Assert\Collection([
45 45
             'amount' =>  $this->buildElement('float', 1),
46
-            'currency' => $this->buildElement('string', 1, ['min' => 3,'max' => 3]),
46
+            'currency' => $this->buildElement('string', 1, ['min' => 3, 'max' => 3]),
47 47
             'settle' => $this->buildElement('bool'),
48
-            'order_id' => $this->buildElement('string', 0, ['min' => 2,'max' => 50]),
48
+            'order_id' => $this->buildElement('string', 0, ['min' => 2, 'max' => 50]),
49 49
             'description' => $this->buildElement('string', 0, ['max' => 255]),
50 50
             'statement_descriptor_suffix' => $this->buildElement('string', 0, ['max' => 255]),
51
-            'country' => $this->buildElement('string', 1, ['min' => 2,'max' => 2]),
51
+            'country' => $this->buildElement('string', 1, ['min' => 2, 'max' => 2]),
52 52
             'payment_method' => new Assert\Required([
53 53
                 new Assert\Type([
54 54
                     'type' => 'string',
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
                     ]),
82 82
                     'exp_year' => $this->buildElement(
83 83
                         'integer', 1, 
84
-                        ['min' => 4,'max' => 4],
84
+                        ['min' => 4, 'max' => 4],
85 85
                         new Assert\Range(['min' => date('Y')])
86 86
                     ),
87 87
                     'exp_month' => $this->buildElement('integer', 1),
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
         ]); 
168 168
     }
169 169
 
170
-    private function buildElement($typeValue, bool $isRequired=false, $length=0, $args=0)
170
+    private function buildElement($typeValue, bool $isRequired = false, $length = 0, $args = 0)
171 171
     {
172 172
         $inside_array = [
173 173
             new Assert\Type([
Please login to merge, or discard this patch.
src/Method/Payment/Finalize.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
      * @param STRING authorize data 'cres' or 'authorize_data'
17 17
      * @param BOOL should it be 3D secure v2 ?
18 18
      */
19
-    public function __construct(string $paymentId, string $authorizeData, $isV2=false)
19
+    public function __construct(string $paymentId, string $authorizeData, $isV2 = false)
20 20
     {
21 21
         $this->paymentId = $paymentId;
22 22
         $this->authorizeData = $authorizeData;
Please login to merge, or discard this patch.
src/Method/Payment/Payment.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -405,7 +405,7 @@
 block discarded – undo
405 405
      */
406 406
     public function setThreeds2Data(
407 407
         ThreeDS2AuthorizationInformation $threeDS2AuthorizationInformation
408
-    ){
408
+    ) {
409 409
         $this->threeDS2AuthorizationInformation = $threeDS2AuthorizationInformation;
410 410
     }
411 411
 
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -413,10 +413,10 @@
 block discarded – undo
413 413
         $this->threeDS2AuthorizationInformation = $threeDS2AuthorizationInformation;
414 414
     }
415 415
 
416
-     /**
417
-     * Gets the value of statementDescriptorDuffix.
418
-     * @return mixed
419
-     */
416
+        /**
417
+         * Gets the value of statementDescriptorDuffix.
418
+         * @return mixed
419
+         */
420 420
     public function getStatementDescriptorDuffix()
421 421
     {
422 422
         return $this->statementDescriptorDuffix;
Please login to merge, or discard this patch.