more minor fixes and code-cleaning

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-08-10 12:01:26 +02:00
parent e82d7b5d8b
commit 94a19ee2b6
16 changed files with 33 additions and 29 deletions

View File

@@ -458,7 +458,7 @@ class PhpHelper
'ssl_default_vhostconf_domain',
'filecontent'
];
if (isset($global) && !empty($global)) {
if (!empty($global)) {
$tmp = $global;
foreach ($tmp as $index => $value) {
if (!in_array($index, $ignored_fields)) {
@@ -516,7 +516,7 @@ class PhpHelper
$str .= self::tabPrefix(($depth-1), "[\n");
}
foreach ($array as $key => $value) {
if (isset($key) && !is_array($value)) {
if (!is_array($value)) {
if (is_bool($value)) {
$str .= self::tabPrefix($depth, sprintf("'%s' => %s,\n", $key, $value ? 'true' : 'false'));
} elseif (is_int($value)) {