@@ -43,7 +43,7 @@ |
||
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 |
@@ -34,12 +34,12 @@ |
||
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 | } |
@@ -353,7 +353,7 @@ |
||
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 | } |
@@ -138,7 +138,7 @@ |
||
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 |
@@ -58,7 +58,7 @@ discard block |
||
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 |
||
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 | } |
@@ -23,7 +23,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -39,7 +39,7 @@ discard block |
||
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 |
||
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 |
||
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 |
@@ -46,8 +46,8 @@ discard block |
||
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 |
||
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 |
@@ -216,10 +216,10 @@ |
||
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']); |
@@ -74,14 +74,14 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |