From 82f195dc3057f6eef8fce4b4659f9a3b8c9a0f8d Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Mon, 14 Jun 2021 19:15:53 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/core/class/validate.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/validate.class.php b/htdocs/core/class/validate.class.php index 3f94da5dbe0..2b9d98ae5e0 100644 --- a/htdocs/core/class/validate.class.php +++ b/htdocs/core/class/validate.class.php @@ -51,7 +51,7 @@ class Validate * @param DoliDB $db Database handler * @param Translate $outputLang */ - public function __construct($db,$outputLang = false) + public function __construct($db, $outputLang = false) { global $langs; @@ -121,7 +121,7 @@ class Validate */ public function isTimestamp($stamp) { - if (!is_numeric($stamp) && (int)$stamp == $stamp) { + if (!is_numeric($stamp) && (int) $stamp == $stamp) { $this->error = $this->outputLang->trans('RequireValidDate'); return false; } @@ -229,7 +229,7 @@ class Validate */ public function isBool($bool) { - if(!(is_null($bool) || is_bool($bool) || preg_match('/^[0|1]{1}$/ui', $bool))){ + if (!(is_null($bool) || is_bool($bool) || preg_match('/^[0|1]{1}$/ui', $bool))) { $this->error = $this->outputLang->trans('RequireValidBool'); return false; } @@ -258,7 +258,7 @@ class Validate return false; } - foreach ($value_arr as $val){ + foreach ($value_arr as $val) { $sql = 'SELECT ' . $col . ' FROM ' . MAIN_DB_PREFIX . $table . " WHERE " . $col ." = '" . $this->db->escape($val) . "'"; // nore quick than count(*) to check existing of a row $resql = $this->db->getRow($sql); if ($resql) {