Improve determinism

phpcs-errors:226 phpunit-status:successful phpstan-errors:199
This commit is contained in:
2020-09-06 00:08:07 +02:00
committed by Stefan Rohde-Enslin
parent 688ba604a8
commit 3267b7aad9
6 changed files with 8 additions and 6 deletions

View File

@ -33,7 +33,9 @@ if (!file_exists($csv_datei)) {
if (is_dir(__DIR__ . "/xml")) rrmdir(__DIR__ . '/xml');
mkdir(__DIR__ . "/xml", 0755);
$fp = fopen ($csv_datei, 'r');
if (!($fp = fopen($csv_datei, 'r'))) {
throw new MDmainEntityNotExistentException("Failed opening file");
}
$y = 0;
while ($zeile = fgetcsv($fp, 100000, ';')) {

View File

@ -16,7 +16,7 @@ if ($handle = opendir($fileDir)) {
$pathData = pathinfo($fileDir . $file);
$fileName = $pathData['filename'];
if ($file != '1.xml')
$zip->addFile(file_get_contents($fileDir . $file), $file, filectime($fileDir . $file));
$zip->addFile(MD_STD::file_get_contents($fileDir . $file), $file, filectime($fileDir . $file));
}
}
}