From bcae218cbb949ce8a5c57d18f52de462a20e824b Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Sat, 19 Oct 2019 21:36:27 +0100 Subject: [PATCH] composer format time --- functions.inc.php | 3 +-- model/PFAHandler.php | 6 +++--- public/edit.php | 2 +- public/users/password-recover.php | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/functions.inc.php b/functions.inc.php index c7f202c9..417a73ce 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -548,7 +548,7 @@ function create_page_browser($idxfield, $querypart, $sql_params = []) { if (db_sqlite()) { $end = $idxfield; - if(strpos($idxfield, '.') !== false) { + if (strpos($idxfield, '.') !== false) { $bits = explode('.', $idxfield); $end = $bits[1]; } @@ -1911,7 +1911,6 @@ function db_in_clause($field, array $values) { * This also means you'll need to set a (dummy) condition for NULL and NOTNULL. */ function db_where_clause(array $condition, array $struct, $additional_raw_where = '', array $searchmode = array()) { - if (count($condition) == 0 && trim($additional_raw_where) == '') { throw new Exception("db_where_cond: parameter is an empty array!"); } diff --git a/model/PFAHandler.php b/model/PFAHandler.php index 97600c04..7a11c938 100644 --- a/model/PFAHandler.php +++ b/model/PFAHandler.php @@ -168,10 +168,10 @@ abstract class PFAHandler { */ public function __construct($new = 0, $username = "", $is_admin = 1) { # set label_field if not explicitely set - if(!isset($this->id_field)) { + if (!isset($this->id_field)) { throw new \InvalidArgumentException("id_field must be defined"); } - if(!isset($this->db_table)) { + if (!isset($this->db_table)) { throw new \InvalidArgumentException("db_table must be defined"); } if (empty($this->label_field)) { @@ -237,7 +237,7 @@ abstract class PFAHandler { ); } - if(empty($this->db_table)) { + if (empty($this->db_table)) { throw new Exception("db_table not defined"); } $struct_hook = Config::read_string($this->db_table . '_struct_hook'); diff --git a/public/edit.php b/public/edit.php index d5576805..dae86643 100644 --- a/public/edit.php +++ b/public/edit.php @@ -27,7 +27,7 @@ require_once('common.php'); $username = authentication_get_username(); # enforce login $table = safepost('table', safeget('table')); -if(!is_string($table)) { +if (!is_string($table)) { die("Invalid table name given!"); } $handlerclass = ucfirst($table) . 'Handler'; diff --git a/public/users/password-recover.php b/public/users/password-recover.php index 78d42db9..ff5c4c61 100644 --- a/public/users/password-recover.php +++ b/public/users/password-recover.php @@ -52,7 +52,7 @@ function sendCodebySMS($to, $username, $code) { $text = Config::lang_f('pPassword_recovery_sms_body', $code); $function = Config::read('sms_send_function'); - if($function && is_callable($function)) { + if ($function && is_callable($function)) { $result = $function($to, $text); return $result !== false; }