From 434472059a78f8dc079f18959f417bab62e9c2e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= <come@opensides.be> Date: Mon, 25 Feb 2019 17:27:52 +0100 Subject: [PATCH] :ambulance: fix(code) Fix code style Fixes of spaces by php-cs-fixer issue #5955 --- contrib/smarty/plugins/function.filePath.php | 2 +- contrib/smarty/plugins/function.iconPath.php | 2 +- html/autocomplete.php | 6 +++--- html/getbin.php | 2 +- html/index.php | 8 ++++---- html/main.php | 6 +++--- html/progress.php | 6 +++--- html/setup.php | 6 +++--- include/class_filter.inc | 2 +- include/class_ldap.inc | 2 +- include/class_listing.inc | 2 +- include/class_pluglist.inc | 2 +- include/class_templateHandling.inc | 2 +- include/functions.inc | 10 +++++----- include/php_setup.inc | 4 ++-- include/simpleplugin/class_simpleManagement.inc | 2 +- include/simpleplugin/class_simplePlugin.inc | 6 +++--- 17 files changed, 35 insertions(+), 35 deletions(-) diff --git a/contrib/smarty/plugins/function.filePath.php b/contrib/smarty/plugins/function.filePath.php index 977349e4b..d2e9176db 100644 --- a/contrib/smarty/plugins/function.filePath.php +++ b/contrib/smarty/plugins/function.filePath.php @@ -23,7 +23,7 @@ function smarty_function_filePath ($params, Smarty_Internal_Template $smarty) $default_theme = 'breezy'; /* Set theme */ - if (isset ($config)) { + if (isset($config)) { $theme = $config->get_cfg_value('theme', $default_theme); } else { $theme = $default_theme; diff --git a/contrib/smarty/plugins/function.iconPath.php b/contrib/smarty/plugins/function.iconPath.php index d87335bea..08ee40127 100644 --- a/contrib/smarty/plugins/function.iconPath.php +++ b/contrib/smarty/plugins/function.iconPath.php @@ -23,7 +23,7 @@ function smarty_function_iconPath ($params) /* Set theme */ $theme = IconTheme::$default_theme; - if (isset ($config)) { + if (isset($config)) { $theme = $config->get_cfg_value("theme"); } diff --git a/html/autocomplete.php b/html/autocomplete.php index 87f677838..86f4b9b3a 100644 --- a/html/autocomplete.php +++ b/html/autocomplete.php @@ -20,9 +20,9 @@ */ /* Basic setup, remove eventually registered sessions */ -@require_once ("../include/php_setup.inc"); -@require_once ("functions.inc"); -@require_once ("variables.inc"); +@require_once("../include/php_setup.inc"); +@require_once("functions.inc"); +@require_once("variables.inc"); session_cache_limiter("private"); session::start(); diff --git a/html/getbin.php b/html/getbin.php index eabf89b32..edc9413b7 100644 --- a/html/getbin.php +++ b/html/getbin.php @@ -43,7 +43,7 @@ header('Pragma: no-cache'); header('Cache-Control: post-check=0, pre-check=0'); $key = 'binary'; -if (isset ($_GET['key'])) { +if (isset($_GET['key'])) { $key .= $_GET['key']; } diff --git a/html/index.php b/html/index.php index 5f36aaff3..2fe92ef1a 100644 --- a/html/index.php +++ b/html/index.php @@ -20,10 +20,10 @@ */ /* Load required includes */ -require_once ("../include/php_setup.inc"); -require_once ("functions.inc"); -require_once ("variables.inc"); -require_once ("class_logging.inc"); +require_once("../include/php_setup.inc"); +require_once("functions.inc"); +require_once("variables.inc"); +require_once("class_logging.inc"); /* Set headers */ header('Content-type: text/html; charset=UTF-8'); diff --git a/html/main.php b/html/main.php index 2fea060b6..5a489b0c7 100644 --- a/html/main.php +++ b/html/main.php @@ -20,9 +20,9 @@ */ /* Basic setup, remove eventually registered sessions */ -require_once ("../include/php_setup.inc"); -require_once ("functions.inc"); -require_once ("variables.inc"); +require_once("../include/php_setup.inc"); +require_once("functions.inc"); +require_once("variables.inc"); /* Set headers */ header('Content-type: text/html; charset=UTF-8'); diff --git a/html/progress.php b/html/progress.php index 8b247b80b..5c5ae04fd 100644 --- a/html/progress.php +++ b/html/progress.php @@ -24,10 +24,10 @@ session_cache_limiter("private"); /* Check for parameter completenes */ if (!isset($_GET['x']) || !isset($_GET['y']) || !isset($_GET['p'])) { - die ("Missing parameters!"); + die("Missing parameters!"); } if (!is_numeric($_GET['x']) || !is_numeric($_GET['y'])) { - die ("Parameters must be numeric!"); + die("Parameters must be numeric!"); } $p = (int)($_GET['p']); @@ -76,7 +76,7 @@ if (!function_exists("imagecreate")) { /* Draw image in GD image stream */ $im = imagecreate($x, $y); if (!$im) { - die ('Cannot Initialize new GD image stream'); + die('Cannot Initialize new GD image stream'); } /* Set colors */ diff --git a/html/setup.php b/html/setup.php index 50112ffc6..f9ef8a8af 100644 --- a/html/setup.php +++ b/html/setup.php @@ -20,9 +20,9 @@ */ /* Get standard functions */ -require_once ("../include/php_setup.inc"); -require_once ("functions.inc"); -require_once ("variables.inc"); +require_once("../include/php_setup.inc"); +require_once("functions.inc"); +require_once("variables.inc"); require_once("../setup/class_setup.inc"); require_once("../setup/class_setupStep.inc"); diff --git a/include/class_filter.inc b/include/class_filter.inc index cd46381be..6f5a77692 100644 --- a/include/class_filter.inc +++ b/include/class_filter.inc @@ -335,7 +335,7 @@ class filter function render () { /* If template is not filled, we display nothing */ - if (!isset ($this->xmlData['definition']['template'])) { + if (!isset($this->xmlData['definition']['template'])) { return ""; } diff --git a/include/class_ldap.inc b/include/class_ldap.inc index 431723505..7f6ff508c 100644 --- a/include/class_ldap.inc +++ b/include/class_ldap.inc @@ -1374,7 +1374,7 @@ class LDAP /* Build LDAP connection */ $ds = ldap_connect($server); if (!$ds) { - die ('Can\'t bind to LDAP. No check possible!'); + die('Can\'t bind to LDAP. No check possible!'); } ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3); ldap_bind($ds, $admin, $password); diff --git a/include/class_listing.inc b/include/class_listing.inc index 1e4913c8b..fd1a034a3 100644 --- a/include/class_listing.inc +++ b/include/class_listing.inc @@ -1431,7 +1431,7 @@ class listing global $ui; if (isset($action['acl'])) { - if (isset ($action['aclInfos'])) { + if (isset($action['aclInfos'])) { $aclInfos = $action['aclInfos']; } else { /* First time we check permission for this action */ diff --git a/include/class_pluglist.inc b/include/class_pluglist.inc index 806fb5f78..e23764cff 100644 --- a/include/class_pluglist.inc +++ b/include/class_pluglist.inc @@ -559,7 +559,7 @@ class pluglist } if (is_file("$plugin_dir/main.inc")) { $display = ''; - require ("$plugin_dir/main.inc"); + require("$plugin_dir/main.inc"); } elseif (is_callable(array($plugin, 'mainInc'))) { $plugin::mainInc(); } else { diff --git a/include/class_templateHandling.inc b/include/class_templateHandling.inc index c2cf79ed9..db1af78fc 100644 --- a/include/class_templateHandling.inc +++ b/include/class_templateHandling.inc @@ -613,7 +613,7 @@ class templateHandling if (!is_array($values)) { $values = array($values); } - unset ($values['count']); + unset($values['count']); foreach ($values as $value) { $offset = 0; while (preg_match('/%([^%\|]+\|)?([^%]+)%/', $value, $m, PREG_OFFSET_CAPTURE, $offset)) { diff --git a/include/functions.inc b/include/functions.inc index 4a1df7444..d06ba538d 100644 --- a/include/functions.inc +++ b/include/functions.inc @@ -25,12 +25,12 @@ */ /* Define common locations and variables */ -require_once ('variables.inc'); +require_once('variables.inc'); /* Include required files */ -require_once (CACHE_DIR.'/'.CLASS_CACHE); -require_once ('functions_debug.inc'); -require_once ('accept-to-gettext.inc'); +require_once(CACHE_DIR.'/'.CLASS_CACHE); +require_once('functions_debug.inc'); +require_once('accept-to-gettext.inc'); /* Define constants for debugging */ define('DEBUG_TRACE', 1); /*! Debug level for tracing of common actions (save, check, etc.) */ @@ -234,7 +234,7 @@ function get_template_path ($filename = '', $plugin = FALSE, $path = '') $default_theme = 'breezy'; /* Set theme */ - if (isset ($config)) { + if (isset($config)) { $theme = $config->get_cfg_value('theme', $default_theme); } else { $theme = $default_theme; diff --git a/include/php_setup.inc b/include/php_setup.inc index a091892ea..f8c0dbd28 100644 --- a/include/php_setup.inc +++ b/include/php_setup.inc @@ -24,7 +24,7 @@ * \file php_setup.inc * Source code for php_setup */ -require_once ("variables.inc"); +require_once("variables.inc"); function html_trace ($errstr = "") { @@ -36,7 +36,7 @@ function html_trace ($errstr = "") 'LDAP/__construct' => array(1), ); if (!function_exists('debug_backtrace')) { - return array ('', ''); + return array('', ''); } $trace = array_slice(debug_backtrace(), 1); diff --git a/include/simpleplugin/class_simpleManagement.inc b/include/simpleplugin/class_simpleManagement.inc index 55e05b899..0e61b1436 100644 --- a/include/simpleplugin/class_simpleManagement.inc +++ b/include/simpleplugin/class_simpleManagement.inc @@ -695,7 +695,7 @@ class simpleManagement if (static::$skipTemplates) { return; } - if (isset ($target[0])) { + if (isset($target[0])) { $dn = $target[0]; } else { $dn = NULL; diff --git a/include/simpleplugin/class_simplePlugin.inc b/include/simpleplugin/class_simplePlugin.inc index 03e0cd804..bfead1c09 100644 --- a/include/simpleplugin/class_simplePlugin.inc +++ b/include/simpleplugin/class_simplePlugin.inc @@ -1168,7 +1168,7 @@ class simplePlugin if (is_array($this->attrs[$index]) && (count($this->attrs[$index]) == 0) && !isset($this->saved_attributes[$index])) { - unset ($this->attrs[$index]); + unset($this->attrs[$index]); continue; } @@ -1177,7 +1177,7 @@ class simplePlugin isset($this->saved_attributes[$index]) && !is_array($this->saved_attributes[$index]) && ($this->attrs[$index] == $this->saved_attributes[$index])) { - unset ($this->attrs[$index]); + unset($this->attrs[$index]); continue; } @@ -1186,7 +1186,7 @@ class simplePlugin isset($this->saved_attributes[$index]) && is_array($this->saved_attributes[$index]) && !array_differs($this->attrs[$index], $this->saved_attributes[$index])) { - unset ($this->attrs[$index]); + unset($this->attrs[$index]); continue; } } -- GitLab