cs: Enable more risky rules.

This commit is contained in:
Pol Dellaiera
2021-11-30 12:09:24 +01:00
parent 6ce511889f
commit 579c349e28
22 changed files with 29 additions and 15 deletions

View File

@@ -228,7 +228,7 @@ class CSVFormatter implements FormatterInterface
$content = [];
// create a file pointer connected to the output stream
$output = fopen('php://output', 'w');
$output = fopen('php://output', 'wb');
//title
fputcsv($output, [$this->translator->trans($this->export->getTitle())]);

View File

@@ -115,7 +115,7 @@ class CSVListFormatter implements FormatterInterface
$this->exportData = $exportData;
$this->formatterData = $formatterData;
$output = fopen('php://output', 'w');
$output = fopen('php://output', 'wb');
$this->prepareHeaders($output);

View File

@@ -110,7 +110,7 @@ class CSVPivotedListFormatter implements FormatterInterface
$this->exportData = $exportData;
$this->formatterData = $formatterData;
$output = fopen('php://output', 'w');
$output = fopen('php://output', 'wb');
$i = 1;
$lines = [];

View File

@@ -204,7 +204,7 @@ class SpreadSheetFormatter implements FormatterInterface
$this->tempfile = tempnam(sys_get_temp_dir(), '');
$this->generateContent();
$f = fopen($this->tempfile, 'r');
$f = fopen($this->tempfile, 'rb');
$response->setContent(stream_get_contents($f));
fclose($f);

View File

@@ -199,7 +199,7 @@ class SpreadsheetListFormatter implements FormatterInterface
$tempfile = tempnam(sys_get_temp_dir(), '');
$writer->save($tempfile);
$f = fopen($tempfile, 'r');
$f = fopen($tempfile, 'rb');
$response->setContent(stream_get_contents($f));
fclose($f);