@@ -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); |