@@ -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') |
@@ -48,8 +48,8 @@ |
||
48 | 48 | ]); |
49 | 49 | |
50 | 50 | $builder->addModelTransformer(new CallbackTransformer( |
51 | - static function ($data) { return $data; }, |
|
52 | - static function ($data) { |
|
51 | + static function($data) { return $data; }, |
|
52 | + static function($data) { |
|
53 | 53 | if (ComparisonType::BETWEEN === $data['comparison']) { |
54 | 54 | if (null === $data['value'] || '' === $data['value'] || null === $data['value2'] || '' === $data['value2']) { |
55 | 55 | throw new TransformationFailedException('Two values must be provided when "BETWEEN" comparison is selected.'); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | $choices = []; |
37 | 37 | |
38 | 38 | foreach (Department::ALLOWED_TYPES as $type) { |
39 | - $choices['department.type.'.$type] = $type; |
|
39 | + $choices['department.type.' . $type] = $type; |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | $choices['department.type.section_misc'] = 'section_misc'; |
@@ -69,6 +69,6 @@ discard block |
||
69 | 69 | $filterDataDto->getValue() |
70 | 70 | ); |
71 | 71 | } |
72 | - $queryBuilder->leftJoin($filterDataDto->getEntityAlias().'.department', 'department'); |
|
72 | + $queryBuilder->leftJoin($filterDataDto->getEntityAlias() . '.department', 'department'); |
|
73 | 73 | } |
74 | 74 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | use FieldTrait; |
31 | 31 | |
32 | - public static function new(string $propertyName, ?string $label = null): VichyFileField |
|
32 | + public static function new(string $propertyName, ?string $label = null) : VichyFileField |
|
33 | 33 | { |
34 | 34 | return (new self()) |
35 | 35 | ->setProperty($propertyName) |