@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | return $this->getFirstName(); |
| 312 | 312 | } |
| 313 | 313 | |
| 314 | - return $this->getFirstName().' '.$this->getLastName(); |
|
| 314 | + return $this->getFirstName() . ' ' . $this->getLastName(); |
|
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | /** |
@@ -460,6 +460,6 @@ discard block |
||
| 460 | 460 | |
| 461 | 461 | public function __toString(): string |
| 462 | 462 | { |
| 463 | - return $this->getFullName().' ('.$this->username.')'; |
|
| 463 | + return $this->getFullName() . ' (' . $this->username . ')'; |
|
| 464 | 464 | } |
| 465 | 465 | } |
@@ -267,7 +267,7 @@ |
||
| 267 | 267 | return $this->getFirstName(); |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | - return $this->getFirstName().' '.$this->getLastName(); |
|
| 270 | + return $this->getFirstName() . ' ' . $this->getLastName(); |
|
| 271 | 271 | } |
| 272 | 272 | |
| 273 | 273 | /** |
@@ -270,6 +270,6 @@ |
||
| 270 | 270 | */ |
| 271 | 271 | public function getAddress(): string |
| 272 | 272 | { |
| 273 | - return $this->getStreet().', '.$this->getZipCode().' '.$this->getCity(); |
|
| 273 | + return $this->getStreet() . ', ' . $this->getZipCode() . ' ' . $this->getCity(); |
|
| 274 | 274 | } |
| 275 | 275 | } |
@@ -210,6 +210,6 @@ |
||
| 210 | 210 | */ |
| 211 | 211 | public function __toString(): string |
| 212 | 212 | { |
| 213 | - return ($this->name ?? 'unknown').' ['.$this->iban.']'; |
|
| 213 | + return ($this->name ?? 'unknown') . ' [' . $this->iban . ']'; |
|
| 214 | 214 | } |
| 215 | 215 | } |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | { |
| 30 | 30 | public function Header() |
| 31 | 31 | { |
| 32 | - $image_file = dirname(__DIR__, 3).'/assets/StuRa.png'; |
|
| 32 | + $image_file = dirname(__DIR__, 3) . '/assets/StuRa.png'; |
|
| 33 | 33 | |
| 34 | 34 | //$image_file = 'C:\Users\janhb\Documents\Projekte\PHP\stura\assets\StuRa.png'; |
| 35 | 35 | |
@@ -53,11 +53,11 @@ discard block |
||
| 53 | 53 | // Set font |
| 54 | 54 | $this->SetFont('helvetica', 'I', 8); |
| 55 | 55 | // Page number |
| 56 | - $this->Cell(0, 10, 'Seite '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'L'); |
|
| 56 | + $this->Cell(0, 10, 'Seite ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'L'); |
|
| 57 | 57 | |
| 58 | 58 | $formatter = new IntlDateFormatter('de-DE', IntlDateFormatter::SHORT, IntlDateFormatter::MEDIUM); |
| 59 | 59 | |
| 60 | - $this->Cell(0, 10, 'Erzeugt '.$formatter->format(new DateTime()), 0, false, 'R'); |
|
| 60 | + $this->Cell(0, 10, 'Erzeugt ' . $formatter->format(new DateTime()), 0, false, 'R'); |
|
| 61 | 61 | |
| 62 | 62 | //$this->Cell(0, 0, 'Seite '.$this->getAliasNumPage().'/'.$this->getAliasNbPages()); |
| 63 | 63 | } |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | $pdf = new SturaPDF(); |
| 42 | 42 | $pdf->setAuthor('StuRa FSU Jena'); |
| 43 | - $pdf->setTitle('Zahlungsauftrag #'.$paymentOrder->getId()); |
|
| 43 | + $pdf->setTitle('Zahlungsauftrag #' . $paymentOrder->getId()); |
|
| 44 | 44 | $pdf->setSubject('Zahlungsauftrag'); |
| 45 | 45 | $pdf->SetAutoPageBreak(false); |
| 46 | 46 | |
@@ -49,12 +49,12 @@ discard block |
||
| 49 | 49 | $pdf->setY(80); |
| 50 | 50 | $pdf->setMargins(25, 10); |
| 51 | 51 | |
| 52 | - $pdf->writeHTML('<h1>Zahlungsauftrag #'.$paymentOrder->getId().'</h1><br>'); |
|
| 52 | + $pdf->writeHTML('<h1>Zahlungsauftrag #' . $paymentOrder->getId() . '</h1><br>'); |
|
| 53 | 53 | |
| 54 | 54 | $this->writeRow($pdf, 'Name des Zahlungsempfängers', $paymentOrder->getFullName()); |
| 55 | 55 | $this->writeRow($pdf, 'Struktur / Organisation', $paymentOrder->getDepartment()->getName()); |
| 56 | 56 | $this->writeRow($pdf, 'Projektbezeichnung', $paymentOrder->getProjectName()); |
| 57 | - $this->writeRow($pdf, 'Betrag', $paymentOrder->getAmountString().' €'); |
|
| 57 | + $this->writeRow($pdf, 'Betrag', $paymentOrder->getAmountString() . ' €'); |
|
| 58 | 58 | $this->writeRow($pdf, 'Mittelfreigabe / Finanzantrag', !empty($paymentOrder->getFundingId()) ? $paymentOrder->getFundingId() : '<i>Nicht angegeben</i>'); |
| 59 | 59 | $this->writeRow($pdf, 'FSR-Kom Antrag', $paymentOrder->isFsrKomResolution() ? 'Ja' : 'Nein'); |
| 60 | 60 | $formatter = new IntlDateFormatter('de_DE', IntlDateFormatter::MEDIUM, IntlDateFormatter::NONE); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | |
| 65 | 65 | $this->writeRow($pdf, 'Kontoinhaber*in', $paymentOrder->getBankInfo()->getAccountOwner()); |
| 66 | 66 | $this->writeRow($pdf, 'Straße/Nr.', $paymentOrder->getBankInfo()->getStreet()); |
| 67 | - $this->writeRow($pdf, 'PLZ/Ort', $paymentOrder->getBankInfo()->getZipCode().' '.$paymentOrder->getBankInfo()->getCity()); |
|
| 67 | + $this->writeRow($pdf, 'PLZ/Ort', $paymentOrder->getBankInfo()->getZipCode() . ' ' . $paymentOrder->getBankInfo()->getCity()); |
|
| 68 | 68 | $this->writeRow($pdf, 'IBAN', $paymentOrder->getBankInfo()->getIban()); |
| 69 | 69 | $this->writeRow($pdf, 'BIC', $paymentOrder->getBankInfo()->getBic()); |
| 70 | 70 | $this->writeRow($pdf, 'Bank', $paymentOrder->getBankInfo()->getBankName()); |
@@ -91,12 +91,12 @@ discard block |
||
| 91 | 91 | |
| 92 | 92 | private function addSignatureField(TCPDF $pdf, string $content, bool $ln = true, string $align = 'L'): void |
| 93 | 93 | { |
| 94 | - $pdf->writeHTML('_____________________________________________<br><small>'.$content.'</small>', $ln, false, false, false, $align); |
|
| 94 | + $pdf->writeHTML('_____________________________________________<br><small>' . $content . '</small>', $ln, false, false, false, $align); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | private function writeRow(TCPDF $pdf, string $property, string $value): void |
| 98 | 98 | { |
| 99 | - $pdf->MultiCell(80, 5, '<b>'.$property.':</b>', 0, 'L', 0, 0, '', '', true, 0, true); |
|
| 99 | + $pdf->MultiCell(80, 5, '<b>' . $property . ':</b>', 0, 'L', 0, 0, '', '', true, 0, true); |
|
| 100 | 100 | $pdf->MultiCell(0, 5, $value, 0, 'L', 0, 1, '', '', true, 0, true); |
| 101 | 101 | } |
| 102 | 102 | } |
@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | */ |
| 47 | 47 | public function getGitBranchName(): ?string |
| 48 | 48 | { |
| 49 | - return $this->cache->get('git_branch', function (ItemInterface $item) { |
|
| 49 | + return $this->cache->get('git_branch', function(ItemInterface $item) { |
|
| 50 | 50 | $item->expiresAfter(4320); //Recache every 12h |
| 51 | - if (is_file($this->project_dir.'/.git/HEAD')) { |
|
| 52 | - $git = file($this->project_dir.'/.git/HEAD'); |
|
| 51 | + if (is_file($this->project_dir . '/.git/HEAD')) { |
|
| 52 | + $git = file($this->project_dir . '/.git/HEAD'); |
|
| 53 | 53 | $head = explode('/', $git[0], 3); |
| 54 | 54 | |
| 55 | 55 | if (!isset($head[2])) { |
@@ -75,10 +75,10 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public function getGitCommitHash(int $length = 7): ?string |
| 77 | 77 | { |
| 78 | - return $this->cache->get('git_hash', function (ItemInterface $item) use ($length) { |
|
| 78 | + return $this->cache->get('git_hash', function(ItemInterface $item) use ($length) { |
|
| 79 | 79 | $item->expiresAfter(4320); //Recache every 12h |
| 80 | 80 | |
| 81 | - $filename = $this->project_dir.'/.git/refs/remotes/origin/'.$this->getGitBranchName(); |
|
| 81 | + $filename = $this->project_dir . '/.git/refs/remotes/origin/' . $this->getGitBranchName(); |
|
| 82 | 82 | if (is_file($filename)) { |
| 83 | 83 | $head = file($filename); |
| 84 | 84 | |
@@ -52,14 +52,14 @@ |
||
| 52 | 52 | |
| 53 | 53 | $filename = mb_strimwidth($slugger->slug($object->getDepartment()->getName() ?? 'unknown'), 0, 16); |
| 54 | 54 | |
| 55 | - $filename .= '_'.mb_strimwidth($slugger->slug($object->getProjectName()), 0, 16); |
|
| 55 | + $filename .= '_' . mb_strimwidth($slugger->slug($object->getProjectName()), 0, 16); |
|
| 56 | 56 | |
| 57 | - $filename .= '_'.date('ymd-His'); |
|
| 57 | + $filename .= '_' . date('ymd-His'); |
|
| 58 | 58 | |
| 59 | - $filename .= '_'.bin2hex(random_bytes(5)); |
|
| 59 | + $filename .= '_' . bin2hex(random_bytes(5)); |
|
| 60 | 60 | |
| 61 | 61 | //Add original extension |
| 62 | - $filename .= '.'.$originalExtension; |
|
| 62 | + $filename .= '.' . $originalExtension; |
|
| 63 | 63 | |
| 64 | 64 | return $filename; |
| 65 | 65 | } |
@@ -57,7 +57,7 @@ |
||
| 57 | 57 | //Add subject |
| 58 | 58 | $mailTo->setHeader('subject', $this->getSubject($paymentOrder)); |
| 59 | 59 | |
| 60 | - $content = 'Link: '. |
|
| 60 | + $content = 'Link: ' . |
|
| 61 | 61 | $this->adminURLGenerator->setController(PaymentOrderCrudController::class) |
| 62 | 62 | ->setEntityId($paymentOrder->getId()) |
| 63 | 63 | ->setAction('detail') |