From 630cfd6d63d1e19a3eefd7ae7df00994efe9c85c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Wed, 24 May 2023 22:20:02 +0200 Subject: [PATCH] Fix linting error introduced by PHP-CS-Fixer v3.17.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- scripts/pi-hole/php/database.php | 20 ++++++++++---------- scripts/pi-hole/php/password.php | 6 +++--- scripts/pi-hole/php/teleporter.php | 14 +++++++------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/scripts/pi-hole/php/database.php b/scripts/pi-hole/php/database.php index f52c6169..4c22f465 100644 --- a/scripts/pi-hole/php/database.php +++ b/scripts/pi-hole/php/database.php @@ -73,12 +73,12 @@ function SQLite3_connect($filename, $mode = SQLITE3_OPEN_READONLY) /** * Add domains to a given table. * - * @param $db object The SQLite3 database connection object - * @param $table string The target table - * @param $domains array Array of domains (strings) to be added to the table - * @param $wildcardstyle boolean Whether to format the input domains in legacy wildcard notation - * @param $returnnum boolean Whether to return an integer or a string - * @param $type integer The target type (0 = exact whitelist, 1 = exact blacklist, 2 = regex whitelist, 3 = regex blacklist) + * @param $db object The SQLite3 database connection object + * @param $table string The target table + * @param $domains array Array of domains (strings) to be added to the table + * @param $wildcardstyle boolean Whether to format the input domains in legacy wildcard notation + * @param $returnnum boolean Whether to return an integer or a string + * @param $type integer The target type (0 = exact whitelist, 1 = exact blacklist, 2 = regex whitelist, 3 = regex blacklist) * @param mixed|null $comment * * @return string Success/error and number of processed domains @@ -199,11 +199,11 @@ function add_to_table($db, $table, $domains, $comment = null, $wildcardstyle = f /** * Remove domains from a given table. * - * @param $db object The SQLite3 database connection object - * @param $table string The target table - * @param $domains array Array of domains (strings) to be removed from the table + * @param $db object The SQLite3 database connection object + * @param $table string The target table + * @param $domains array Array of domains (strings) to be removed from the table * @param $returnnum boolean Whether to return an integer or a string - * @param $type integer The target type (0 = exact whitelist, 1 = exact blacklist, 2 = regex whitelist, 3 = regex blacklist) + * @param $type integer The target type (0 = exact whitelist, 1 = exact blacklist, 2 = regex whitelist, 3 = regex blacklist) * * @return string Success/error and number of processed domains */ diff --git a/scripts/pi-hole/php/password.php b/scripts/pi-hole/php/password.php index 02872630..f6629d3d 100644 --- a/scripts/pi-hole/php/password.php +++ b/scripts/pi-hole/php/password.php @@ -71,9 +71,9 @@ function verifyPassword($pwhash, $use_api = false) // Login successful, redirect the user to the original requested page if ( - $_SERVER['REQUEST_METHOD'] === 'POST' && - strlen($_SERVER['SCRIPT_NAME']) >= 10 && - substr_compare($_SERVER['SCRIPT_NAME'], '/login.php', -10) === 0 + $_SERVER['REQUEST_METHOD'] === 'POST' + && strlen($_SERVER['SCRIPT_NAME']) >= 10 + && substr_compare($_SERVER['SCRIPT_NAME'], '/login.php', -10) === 0 ) { header('Location: '.$redirect_url); exit; diff --git a/scripts/pi-hole/php/teleporter.php b/scripts/pi-hole/php/teleporter.php index 7f742fbb..d7a937eb 100644 --- a/scripts/pi-hole/php/teleporter.php +++ b/scripts/pi-hole/php/teleporter.php @@ -34,9 +34,9 @@ function archive_add_file($path, $name, $subdir = '') /** * Add the contents of a table to the archive. * - * @param $name string The name of the file in the archive to save the table to + * @param $name string The name of the file in the archive to save the table to * @param $table string The table to export - * @param $type integer Type of domains to store + * @param $type integer Type of domains to store */ function archive_add_table($name, $table, $type = -1) { @@ -66,7 +66,7 @@ function archive_add_table($name, $table, $type = -1) /** * Restore the contents of a table from an uploaded archive. * - * @param $file object The file in the archive to restore the table from + * @param $file object The file in the archive to restore the table from * @param $table string The table to import * @param $flush boolean Whether to flush the table before importing the archived data * @@ -214,9 +214,9 @@ function archive_restore_table($file, $table, $flush = false) /** * Create table rows from an uploaded archive file. * - * @param $file object The file in the archive to import - * @param $table string The target table - * @param $flush boolean Whether to flush the table before importing the archived data + * @param $file object The file in the archive to import + * @param $table string The target table + * @param $flush boolean Whether to flush the table before importing the archived data * @param $wildcardstyle boolean Whether to format the input domains in legacy wildcard notation * * @return int Number of processed rows from the imported file @@ -270,7 +270,7 @@ function archive_insert_into_table($file, $table, $flush = false, $wildcardstyle * Flush table if requested. This subroutine flushes each table only once. * * @param $table string The target table - * @param $type integer Type of item to flush in table (applies only to domainlist table) + * @param $type integer Type of item to flush in table (applies only to domainlist table) */ function flush_table($table, $type = null) {