Passed
Push — master ( b587ed...4a4054 )
by Jan
03:55
created
src/Services/SEPAExport/SEPAExportGroupAndSplitHelper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
             }
84 84
 
85 85
             //If no array object is existing yet, create the array
86
-            if(!isset($grouped[$bank_account])) {
86
+            if (!isset($grouped[$bank_account])) {
87 87
                 $grouped[$bank_account] = [];
88 88
             }
89 89
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
         $groups_exceeding_limit = $tmp;
129 129
         /** @var PaymentOrder[][] $output */
130 130
         $output = [];
131
-        while(!empty($groups_exceeding_limit)) {
131
+        while (!empty($groups_exceeding_limit)) {
132 132
             foreach ($groups_exceeding_limit as $key => $group) {
133 133
                 /** @var PaymentOrder[] $group */
134 134
                 //If the group does not exceed the limit, then remove it from the bad list and put it to output array
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
                     $part = array_slice($group, 0, $n + 1);
147 147
                     if ($this->calculateSumAmountOfPaymentOrders($part) > $limit_max_amount) {
148 148
                         //If our group contains just a single element which exceed the limit, then throw an exception, as we can not split it further.
149
-                        if(count($part) === 1) {
149
+                        if (count($part) === 1) {
150 150
                             throw new SinglePaymentOrderExceedsLimit($part[0], $limit_max_amount);
151 151
                         }
152 152
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
                 }
157 157
 
158 158
                 //Split group into our two subgroups of which at least one is below the limit
159
-                $a = array_slice($group, 0 , $split_index);
159
+                $a = array_slice($group, 0, $split_index);
160 160
                 $b = array_slice($group, $split_index);
161 161
 
162 162
                 //Remove the old group from list and add the new split groups
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
      */
194 194
     public function sortPaymentOrderArrayByAmount(array $payment_orders, bool $ascending = true): array
195 195
     {
196
-        usort($payment_orders, function (PaymentOrder $a, PaymentOrder $b) {
196
+        usort($payment_orders, function(PaymentOrder $a, PaymentOrder $b) {
197 197
             //When amounts are the same, use the ID to get a consistent sorting
198 198
             if ($a->getAmount() === $b->getAmount()) {
199 199
                 return $a->getId() <=> $b->getAmount();
Please login to merge, or discard this patch.
src/Services/Upload/ExtendedFileSystemStorage.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
         }
53 53
 
54 54
         $uploadDir = $this->convertWindowsDirectorySeparator($mapping->getUploadDir($obj));
55
-        $uploadDir = empty($uploadDir) ? '' : $uploadDir.'/';
55
+        $uploadDir = empty($uploadDir) ? '' : $uploadDir . '/';
56 56
 
57
-        $tmp = \sprintf('%s/%s', $mapping->getUriPrefix(), $uploadDir.$name);
57
+        $tmp = \sprintf('%s/%s', $mapping->getUriPrefix(), $uploadDir . $name);
58 58
 
59 59
         if (null !== $tmp && $obj instanceof PaymentOrder) {
60 60
             if ('printed_form' === $fieldName || 'printed_form_file' === $fieldName) {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
     protected function doUpload(PropertyMapping $mapping, UploadedFile $file, ?string $dir, string $name): ?File
77 77
     {
78
-        $uploadDir = $mapping->getUploadDestination().\DIRECTORY_SEPARATOR.$dir;
78
+        $uploadDir = $mapping->getUploadDestination() . \DIRECTORY_SEPARATOR . $dir;
79 79
 
80 80
         return $file->move($uploadDir, $name);
81 81
     }
@@ -89,13 +89,13 @@  discard block
 block discarded – undo
89 89
 
90 90
     protected function doResolvePath(PropertyMapping $mapping, ?string $dir, string $name, ?bool $relative = false): string
91 91
     {
92
-        $path = !empty($dir) ? $dir.\DIRECTORY_SEPARATOR.$name : $name;
92
+        $path = !empty($dir) ? $dir . \DIRECTORY_SEPARATOR . $name : $name;
93 93
 
94 94
         if ($relative) {
95 95
             return $path;
96 96
         }
97 97
 
98
-        return $mapping->getUploadDestination().\DIRECTORY_SEPARATOR.$path;
98
+        return $mapping->getUploadDestination() . \DIRECTORY_SEPARATOR . $path;
99 99
     }
100 100
 
101 101
     private function convertWindowsDirectorySeparator(string $string): string
Please login to merge, or discard this patch.