@@ -215,16 +215,16 @@ discard block |
||
| 215 | 215 | $res = explode("\n", $this->getStreetAddress()); |
| 216 | 216 | $prefix = ''; |
| 217 | 217 | if (mb_strlen($this->getCountry()) > 0) { |
| 218 | - $prefix = $this->getCountry().((mb_strlen($this->getPostalCode()) > 0) ? '-' : ' '); |
|
| 218 | + $prefix = $this->getCountry() . ((mb_strlen($this->getPostalCode()) > 0) ? '-' : ' '); |
|
| 219 | 219 | } |
| 220 | 220 | if (mb_strlen($this->getPostalCode()) > 0) { |
| 221 | - $prefix .= $this->getPostalCode().' '; |
|
| 221 | + $prefix .= $this->getPostalCode() . ' '; |
|
| 222 | 222 | } |
| 223 | 223 | if (mb_strlen($this->getLocality()) > 0) { |
| 224 | - $prefix .= $this->getLocality().' '; |
|
| 224 | + $prefix .= $this->getLocality() . ' '; |
|
| 225 | 225 | } |
| 226 | 226 | if (mb_strlen($this->getCanton()) > 0) { |
| 227 | - $prefix .= $this->getCanton().' '; |
|
| 227 | + $prefix .= $this->getCanton() . ' '; |
|
| 228 | 228 | } |
| 229 | 229 | $res[] = trim($prefix); |
| 230 | 230 | |
@@ -241,13 +241,13 @@ discard block |
||
| 241 | 241 | public function getAddress() |
| 242 | 242 | { |
| 243 | 243 | $street = str_replace("\n", ',', $this->getStreetAddress()); |
| 244 | - $locality = $this->postalCode.' '.$this->locality; |
|
| 244 | + $locality = $this->postalCode . ' ' . $this->locality; |
|
| 245 | 245 | |
| 246 | - return $street.', '.$locality.', '.$this->canton.' '.$this->country; |
|
| 246 | + return $street . ', ' . $locality . ', ' . $this->canton . ' ' . $this->country; |
|
| 247 | 247 | } |
| 248 | 248 | |
| 249 | 249 | public function getName() |
| 250 | 250 | { |
| 251 | - return $this->givenName.' '.$this->familyName; |
|
| 251 | + return $this->givenName . ' ' . $this->familyName; |
|
| 252 | 252 | } |
| 253 | 253 | } |
@@ -163,8 +163,8 @@ |
||
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | $now = new \DateTime(); |
| 166 | - $eventPrefix = $event->getOrganizer().' - '.$event->getName(); |
|
| 167 | - $filename = $eventPrefix.'- '.$now->format('c').'.csv'; |
|
| 166 | + $eventPrefix = $event->getOrganizer() . ' - ' . $event->getName(); |
|
| 167 | + $filename = $eventPrefix . '- ' . $now->format('c') . '.csv'; |
|
| 168 | 168 | |
| 169 | 169 | $header = array_keys($event->getAttendances()[0]->toArray()); |
| 170 | 170 | $values = []; |
@@ -78,6 +78,6 @@ |
||
| 78 | 78 | return $subject->getUser() === $user; |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - throw new \LogicException('Attribute '.$attribute.' unknown!'); |
|
| 81 | + throw new \LogicException('Attribute ' . $attribute . ' unknown!'); |
|
| 82 | 82 | } |
| 83 | 83 | } |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | public function streamCsv(string $filename, array $data, array $header): Response |
| 29 | 29 | { |
| 30 | 30 | $response = new StreamedResponse(); |
| 31 | - $response->setCallback(function () use ($header, $data) { |
|
| 31 | + $response->setCallback(function() use ($header, $data) { |
|
| 32 | 32 | $handle = fopen('php://output', 'w+'); |
| 33 | 33 | if (false === $handle) { |
| 34 | 34 | throw new \Exception('could not write to output'); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | $response->setStatusCode(200); |
| 43 | 43 | $response->headers->set('Content-Type', 'text/csv; charset=utf-8'); |
| 44 | - $response->headers->set('Content-Disposition', 'attachment; filename="'.$filename.'"'); |
|
| 44 | + $response->headers->set('Content-Disposition', 'attachment; filename="' . $filename . '"'); |
|
| 45 | 45 | |
| 46 | 46 | return $response; |
| 47 | 47 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | //UTF-8 BOM |
| 57 | 57 | fwrite($handle, "\xEF\xBB\xBF"); |
| 58 | 58 | //set delimiter to specified |
| 59 | - fwrite($handle, 'sep='.static::DELIMITER."\n"); |
|
| 59 | + fwrite($handle, 'sep=' . static::DELIMITER . "\n"); |
|
| 60 | 60 | |
| 61 | 61 | // Add the header of the CSV file |
| 62 | 62 | fputcsv($handle, $header, static::DELIMITER); |