Passed
Push — master ( 26de48...72187c )
by Jan
14:14
created
src/Helpers/SEPAXML/SEPAXMLParser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         return [
36 36
             'msg_id' => (string) ($group_header->MsgId),
37 37
             'number_of_payments' => (int) ($group_header->NbOfTxs),
38
-            'total_sum' => (int) str_replace('.','',$group_header->CtrlSum),
38
+            'total_sum' => (int) str_replace('.', '', $group_header->CtrlSum),
39 39
             'initiator_iban' => (string) $payment_info->DbtrAcct->Id->IBAN,
40 40
             'initiator_bic' => (string) $payment_info->DbtrAgt->FinInstnId->BIC,
41 41
         ];
Please login to merge, or discard this patch.
src/Helpers/SEPAXML/SEPAXMLExportResult.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         }
45 45
 
46 46
         //Perform some checks on the sepa exports
47
-        foreach($sepa_exports as $sepa_export) {
47
+        foreach ($sepa_exports as $sepa_export) {
48 48
             if (!$sepa_export instanceof SEPAExport) {
49 49
                 throw new \InvalidArgumentException('$sepa_exports must all be of type SEPAExport!');
50 50
             }
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      */
152 152
     public function persistSEPAExports(EntityManagerInterface $entityManager): void
153 153
     {
154
-        foreach($this->sepa_exports as $sepa_export) {
154
+        foreach ($this->sepa_exports as $sepa_export) {
155 155
             $entityManager->persist($sepa_export);
156 156
         }
157 157
     }
Please login to merge, or discard this patch.
src/Entity/SEPAExport.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@
 block discarded – undo
277 277
     public function setXmlFile(\Symfony\Component\HttpFoundation\File\File $xml_file): SEPAExport
278 278
     {
279 279
         //Check if $xml_file was changed
280
-        if($this->xml_file === null || $xml_file->getPathname() !== $this->xml_file->getPathname()) {
280
+        if ($this->xml_file === null || $xml_file->getPathname() !== $this->xml_file->getPathname()) {
281 281
             $this->xml_file = $xml_file;
282 282
             $this->updateFromFile();
283 283
         } else {
Please login to merge, or discard this patch.
src/Controller/ExportController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
             try {
86 86
                 //Call function depending on the selected mode
87
-                switch($data['mode']) {
87
+                switch ($data['mode']) {
88 88
                     case 'auto':
89 89
                             $result = $this->sepaExporter->exportAuto($payment_orders);
90 90
                         break;
@@ -113,13 +113,13 @@  discard block
 block discarded – undo
113 113
                 $this->entityManager->flush();
114 114
 
115 115
                 //Return the download
116
-                return $result->getDownloadResponse('export_'.date('Y-m-d_H-i-s'));
116
+                return $result->getDownloadResponse('export_' . date('Y-m-d_H-i-s'));
117 117
 
118 118
             } catch (SEPAExportAutoModeNotPossible $exception) {
119 119
                 //Show error if auto mode is not possible
120 120
                 $this->addFlash('danger',
121 121
                     $this->translator->trans('sepa_export.error.department_missing_account')
122
-                    .': '.$exception->getWrongDepartment()->getName());
122
+                    .': ' . $exception->getWrongDepartment()->getName());
123 123
             }
124 124
         }
125 125
 
Please login to merge, or discard this patch.
public/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 use App\Kernel;
4 4
 
5
-require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
5
+require_once dirname(__DIR__) . '/vendor/autoload_runtime.php';
6 6
 
7
-return function (array $context) {
7
+return function(array $context) {
8 8
     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
9 9
 };
Please login to merge, or discard this patch.
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.
src/Admin/Filter/ULIDFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
         $value = $filterDataDto->getValue();
60 60
 
61 61
         //Only apply filter if provided string is a valid ULID, otherwise we run into an exception
62
-        if(Ulid::isValid($value)) {
62
+        if (Ulid::isValid($value)) {
63 63
             $queryBuilder->andWhere(sprintf('%s.%s = :%s', $alias, $property, $parameterName))
64 64
                 ->setParameter($parameterName, Ulid::fromString($value), 'ulid');
65 65
         } else { //Otherwise just ensure no results are returned using an impossible SQL statement
Please login to merge, or discard this patch.
src/Services/UserSystem/EnforceTFARedirectHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
 
86 86
         foreach ($roles as $role) {
87 87
             foreach ($risky_roles as $risky_role) {
88
-                if (preg_match('/'. $risky_role . '/', $role)) {
88
+                if (preg_match('/' . $risky_role . '/', $role)) {
89 89
                     return true;
90 90
                 }
91 91
             }
Please login to merge, or discard this patch.