Ran PHPCBF over PHP files.

This commit is contained in:
Joshua Ramon Enslin 2019-08-15 00:12:15 +02:00 committed by Stefan Rohde-Enslin
parent 42eb9fdd5e
commit d1f9982dc3
3 changed files with 8 additions and 4 deletions

View File

@ -83,6 +83,7 @@ function lang_getfrombrowser(array $allowed_languages, string $default_language,
// die gefundene Sprache zurückgeben
return $current_lang;
}
/**
@ -94,6 +95,7 @@ function lang_getfrombrowser(array $allowed_languages, string $default_language,
*/
function ensureDir(string $filepath) {
if (!is_dir($filepath)) mkdir($filepath);
}
/**
@ -182,6 +184,7 @@ function transform(string $transform):string {
$transform = html_entity_decode($transform, ENT_QUOTES, "utf-8" );
return $transform;
}
/**
@ -193,6 +196,7 @@ function transform(string $transform):string {
*/
function scanDirConts(string $folder) {
return array_values(array_diff(scandir($folder), [".", "..", ".git"]));
}
// Generating PDFs
@ -210,6 +214,7 @@ function copyFolder(string $from, string $to) {
foreach (array_diff(scandir("$from"), [".", ".."]) as $file) {
copy("$from/$file", "$to/$file");
}
}
/**
@ -225,6 +230,7 @@ function removeFolder(string $folder) {
else unlink("$folder/$file");
}
rmdir($folder);
}
/**
@ -244,6 +250,7 @@ function removeFolderGently(string $folder, string $exclude) {
}
if (count(array_diff(scandir("$folder"), [".", ".."])) == 0) rmdir($folder);
return $output;
}
/**
@ -387,8 +394,6 @@ function printHTMLPage(string $title, string $contents, string $lang = "en", arr
</html>';
return $output;
}
?>

View File

@ -132,6 +132,7 @@ function divToTeX($node):string {
}
return $output;
}
/**
@ -220,4 +221,3 @@ $content
}
?>

View File

@ -62,4 +62,3 @@ $content = str_replace("\\today", date("Y-m-d", filemtime(__DIR__ . "/$sourceFol
echo printHTMLPage("about:" . $title, $content, $lang, $availableLangs, "", $sourceFile);
?>