www/nginx: code style issue

This commit is contained in:
Franco Fichtner
2019-12-02 09:28:35 +01:00
parent 9620b6f76e
commit 9261ccad94
@@ -1,5 +1,6 @@
#!/usr/local/bin/php
<?php
/*
* Copyright (C) 2018 Fabian Franz
* All rights reserved.
@@ -27,6 +28,7 @@
*/
require_once 'config.inc';
use OPNsense\Nginx\Nginx;
use OPNsense\Nginx\ErrorLogParser;
use OPNsense\Nginx\AccessLogParser;
@@ -35,7 +37,6 @@ use OPNsense\Nginx\StreamAccessLogParser;
$log_prefix = '/var/log/nginx/';
$log_suffix = '.log';
if ($_SERVER['argc'] != 3) {
die('{"error": "Incorrect amount of parameters given"}');
}
@@ -67,7 +68,7 @@ switch ($mode) {
$log_file_name = $log_prefix . basename($server_names) . '.' . $mode . $log_suffix;
// this entry has no log file, ignore it
if (!file_exists($log_file_name)) {
continue;
break;
}
$logparser = null;
@@ -78,7 +79,7 @@ switch ($mode) {
}
// we cannot parse the file - something went wrong
if ($logparser == null) {
continue;
break;
}
$lines = array_merge($lines, $logparser->get_result());
if (empty($lines)) {
@@ -108,7 +109,7 @@ switch ($mode) {
}
// we cannot parse the file - something went wrong
if ($logparser == null) {
continue;
break;
}
$lines = array_merge($lines, $logparser->get_result());
if (empty($lines)) {