Passed
Branch master (df9557)
by Jan
09:40
created
src/Controller/Admin/PDFGeneratorController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         $response = new Response($data);
44 44
 
45 45
         $response->headers->set('Content-type', 'application/pdf');
46
-        $response->headers->set('Content-length',  strlen($data));
46
+        $response->headers->set('Content-length', strlen($data));
47 47
         $response->headers->set('Cache-Control', 'private');
48 48
         $response->headers->set('Content-Disposition', 'inline');
49 49
 
Please login to merge, or discard this patch.
src/Controller/Admin/BankAccountCrudController.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,12 +34,12 @@
 block discarded – undo
34 34
     public function configureActions(Actions $actions): Actions
35 35
     {
36 36
         $actions->setPermissions([
37
-                                     Action::EDIT => 'ROLE_EDIT_BANK_ACCOUNTS',
38
-                                     Action::DELETE => 'ROLE_EDIT_BANK_ACCOUNTS',
39
-                                     Action::NEW => 'ROLE_EDIT_BANK_ACCOUNTS',
40
-                                     Action::INDEX => 'ROLE_READ_BANK_ACCOUNTS',
41
-                                     Action::DETAIL => 'ROLE_READ_BANK_ACCOUNTS',
42
-                                 ]);
37
+                                        Action::EDIT => 'ROLE_EDIT_BANK_ACCOUNTS',
38
+                                        Action::DELETE => 'ROLE_EDIT_BANK_ACCOUNTS',
39
+                                        Action::NEW => 'ROLE_EDIT_BANK_ACCOUNTS',
40
+                                        Action::INDEX => 'ROLE_READ_BANK_ACCOUNTS',
41
+                                        Action::DETAIL => 'ROLE_READ_BANK_ACCOUNTS',
42
+                                    ]);
43 43
 
44 44
         return $actions->add(Crud::PAGE_INDEX, Action::DETAIL);
45 45
     }
Please login to merge, or discard this patch.
src/Entity/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -353,7 +353,7 @@
 block discarded – undo
353 353
     public function invalidateBackupCode(string $code): void
354 354
     {
355 355
         $key = array_search($code, $this->backupCodes, true);
356
-        if ($key !== false){
356
+        if ($key !== false) {
357 357
             unset($this->backupCodes[$key]);
358 358
         }
359 359
     }
Please login to merge, or discard this patch.
src/Entity/BankAccount.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@
 block discarded – undo
138 138
      */
139 139
     public function getExportAccountName(): string
140 140
     {
141
-        if(!empty($this->account_name)) {
141
+        if (!empty($this->account_name)) {
142 142
             return $this->account_name;
143 143
         }
144 144
 
Please login to merge, or discard this patch.
src/Services/EmailConfirmation/ConfirmationEmailSender.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $email = $paymentOrder->getDepartment()->getEmailHhv();
59 59
         //Dont send the confirmation email if no email is set, otherwise just confirm it
60 60
         if (!empty($email) && $this->send_notifications) {
61
-            $this->sendConfirmation($paymentOrder, $email , $token, 1);
61
+            $this->sendConfirmation($paymentOrder, $email, $token, 1);
62 62
         } else {
63 63
             $paymentOrder->setConfirm1Timestamp(new \DateTime());
64 64
         }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
         $email = $paymentOrder->getDepartment()->getEmailTreasurer();
74 74
         //Dont send the confirmation email if no email is set, otherwise just confirm it
75 75
         if (!empty($email) && $this->send_notifications) {
76
-            $this->sendConfirmation($paymentOrder, $email , $token, 2);
76
+            $this->sendConfirmation($paymentOrder, $email, $token, 2);
77 77
         } else {
78 78
             $paymentOrder->setConfirm2Timestamp(new \DateTime());
79 79
         }
Please login to merge, or discard this patch.
src/Services/PDF/SturaPDF.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 {
24 24
     public function Header()
25 25
     {
26
-        $image_file = dirname(__DIR__, 3).'/assets/StuRa.png';
26
+        $image_file = dirname(__DIR__, 3) . '/assets/StuRa.png';
27 27
 
28 28
         //$image_file = 'C:\Users\janhb\Documents\Projekte\PHP\stura\assets\StuRa.png';
29 29
 
@@ -31,9 +31,9 @@  discard block
 block discarded – undo
31 31
         // Set font
32 32
         $this->SetFont('helvetica', '', 9);
33 33
         $this->setY(35);
34
-        $this->writeHTMLCell(0,0, 100, 50, '<h2>Studierendenrat</h2>');
35
-        $this->writeHTMLCell(0,0, 145, 55, 'Carl-Zeiss-Straße 3');
36
-        $this->writeHTMLCell(0,0, 145, 60, '07747 Jena');
34
+        $this->writeHTMLCell(0, 0, 100, 50, '<h2>Studierendenrat</h2>');
35
+        $this->writeHTMLCell(0, 0, 145, 55, 'Carl-Zeiss-Straße 3');
36
+        $this->writeHTMLCell(0, 0, 145, 60, '07747 Jena');
37 37
 
38 38
 
39 39
         // Title
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         // Set font
50 50
         $this->SetFont('helvetica', 'I', 8);
51 51
         // Page number
52
-        $this->Cell(0, 10, 'Seite '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'L');
52
+        $this->Cell(0, 10, 'Seite ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'L');
53 53
 
54 54
         $formatter = new \IntlDateFormatter('de-DE', \IntlDateFormatter::SHORT, \IntlDateFormatter::MEDIUM);
55 55
 
Please login to merge, or discard this patch.
src/Services/PDF/PaymentOrderPDFGenerator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $pdf->writeHTML('<h1>Zahlungsauftrag #' . $paymentOrder->getId() . '</h1><br>');
40 40
 
41 41
         $this->writeRow($pdf, 'Name des Zahlungsempfängers', $paymentOrder->getFullName());
42
-        $this->writeRow($pdf,'Struktur / Organisation', $paymentOrder->getDepartment()->getName());
42
+        $this->writeRow($pdf, 'Struktur / Organisation', $paymentOrder->getDepartment()->getName());
43 43
         $this->writeRow($pdf, 'Projektbezeichnung', $paymentOrder->getProjectName());
44 44
         $this->writeRow($pdf, 'Betrag', $paymentOrder->getAmountString() . ' €');
45 45
         $this->writeRow($pdf, 'Mittelfreigabe / Finanzantrag', !empty($paymentOrder->getFundingId()) ? $paymentOrder->getFundingId() : '<i>Nicht angegeben</i>');
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
                 und mit dem Jahresabschluss beim StuRa abgegeben!');
68 68
         $pdf->writeHTML('Mit meiner Unterschrift erkläre ich, dass die Angaben hier korrekt sind und ich alle Belege vorliegen habe.');
69 69
 
70
-        if($paymentOrder->getDepartment()->getType() == 'fsr') {
70
+        if ($paymentOrder->getDepartment()->getType() == 'fsr') {
71 71
             $pdf->Ln(20);
72 72
             $this->addSignatureField($pdf, 'Datum, Unterschrift FSR Verantwortliche', false);
73 73
         }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 
90 90
     private function writeRow(\TCPDF $pdf, string $property, string $value): void
91 91
     {
92
-        $pdf->MultiCell(80, 5, '<b>' . $property .':</b>', 0, 'L', 0, 0, '', '', true, 0, true);
92
+        $pdf->MultiCell(80, 5, '<b>' . $property . ':</b>', 0, 'L', 0, 0, '', '', true, 0, true);
93 93
         $pdf->MultiCell(0, 5, $value, 0, 'L', 0, 1, '', '', true, 0, true);
94 94
     }
95 95
 }
96 96
\ No newline at end of file
Please login to merge, or discard this patch.
src/Services/GitVersionInfo.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
     {
47 47
         return $this->cache->get('git_branch', function(ItemInterface $item) {
48 48
             $item->expiresAfter(4320); //Recache every 12h
49
-            if (is_file($this->project_dir.'/.git/HEAD')) {
50
-            $git = file($this->project_dir.'/.git/HEAD');
49
+            if (is_file($this->project_dir . '/.git/HEAD')) {
50
+            $git = file($this->project_dir . '/.git/HEAD');
51 51
             $head = explode('/', $git[0], 3);
52 52
 
53 53
             if (!isset($head[2])) {
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         return $this->cache->get('git_hash', function(ItemInterface $item) use ($length) {
76 76
             $item->expiresAfter(4320); //Recache every 12h
77 77
 
78
-            $filename = $this->project_dir.'/.git/refs/remotes/origin/'.$this->getGitBranchName();
78
+            $filename = $this->project_dir . '/.git/refs/remotes/origin/' . $this->getGitBranchName();
79 79
             if (is_file($filename)) {
80 80
                 $head = file($filename);
81 81
 
Please login to merge, or discard this patch.
src/Services/PaymentOrdersSEPAExporter.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -216,10 +216,10 @@
 block discarded – undo
216 216
     protected function configureOptions(OptionsResolver $resolver): void
217 217
     {
218 218
         $resolver->setRequired([
219
-                                   'iban', //The IBAN of the sender
220
-                                   'bic', //The BIC of the sender
221
-                                   'name', //The name of the sender
222
-                               ]);
219
+                                    'iban', //The IBAN of the sender
220
+                                    'bic', //The BIC of the sender
221
+                                    'name', //The name of the sender
222
+                                ]);
223 223
 
224 224
         $resolver->setAllowedTypes('iban', ['string', 'null']);
225 225
         $resolver->setAllowedTypes('bic', ['string', 'null']);
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -74,14 +74,14 @@  discard block
 block discarded – undo
74 74
 
75 75
         foreach ($accounts as $account_info) {
76 76
             $groupHeader = new GroupHeader(
77
-                static::ID_PREFIX.' '.uniqid('', false),
77
+                static::ID_PREFIX . ' ' . uniqid('', false),
78 78
                 static::PARTY_NAME
79 79
             );
80 80
             $sepaFile = new CustomerCreditTransferFile($groupHeader);
81 81
 
82 82
             // A single payment info where all PaymentOrders are added as transactions
83 83
             $payment = new PaymentInformation(
84
-                static::PAYMENT_PREFIX.' '.uniqid('', false),
84
+                static::PAYMENT_PREFIX . ' ' . uniqid('', false),
85 85
                 $account_info['iban'],
86 86
                 $account_info['bic'],
87 87
                 $account_info['name']
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $return = [];
106 106
 
107 107
         //Export every payment order separately
108
-        foreach($payment_orders as $payment_order) {
108
+        foreach ($payment_orders as $payment_order) {
109 109
             /** @var PaymentOrder $payment_order */
110 110
             $bank_account = $this->getResolvedBankAccount($payment_order);
111 111
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
             // A single payment info where all PaymentOrders are added as transactions
119 119
             $payment = new PaymentInformation(
120
-                $payment_order->getIDString() . ' '.uniqid('', false),
120
+                $payment_order->getIDString() . ' ' . uniqid('', false),
121 121
                 str_replace(' ', '', $bank_account->getIban()),
122 122
                 $bank_account->getBic(),
123 123
                 $bank_account->getExportAccountName()
@@ -144,13 +144,13 @@  discard block
 block discarded – undo
144 144
     protected function addPaymentOrderTransactions(PaymentInformation $payment, array $payment_orders): void
145 145
     {
146 146
         //We only have one SEPA-Payment but it contains multiple transactions (each for one PaymentOrder)
147
-        foreach($payment_orders as $payment_order) {
147
+        foreach ($payment_orders as $payment_order) {
148 148
             /** @var PaymentOrder $payment_order */
149 149
 
150 150
             $transfer = new CustomerCreditTransferInformation(
151 151
                 $payment_order->getAmountString(),
152 152
                 //We need a IBAN without spaces
153
-                str_replace(' ', '',$payment_order->getBankInfo()->getIban()),
153
+                str_replace(' ', '', $payment_order->getBankInfo()->getIban()),
154 154
                 $payment_order->getBankInfo()->getAccountOwner()
155 155
             );
156 156
             if (!empty($payment_order->getBankInfo()->getBic())) {
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
         $resolver->setAllowedValues('mode', ['auto', 'manual', 'auto_single']);
233 233
 
234 234
         $resolver->setNormalizer('iban', function(Options  $options, $value) {
235
-            if ($value === null ){
235
+            if ($value === null) {
236 236
                 return $value;
237 237
             }
238 238
             //Return spaces from IBAN
Please login to merge, or discard this patch.