diff options
author | Alexander Shubin <aleksandrs.subins@zabbix.com> | 2022-03-01 19:05:00 +0300 |
---|---|---|
committer | Alexander Shubin <aleksandrs.subins@zabbix.com> | 2022-03-01 19:05:00 +0300 |
commit | 2e29ae21f7619f638cdabb539287f5b3bb3d468b (patch) | |
tree | 75cc16560f117e6b4854b8916dde5eb216fedd26 /ui | |
parent | 755adbdd113b258cb0c46a5465ef3969c8cdac22 (diff) |
..F....... [ZBXNEXT-7478] fixed code style
Diffstat (limited to 'ui')
-rw-r--r-- | ui/include/classes/api/services/CTriggerGeneral.php | 2 | ||||
-rw-r--r-- | ui/include/classes/core/Manager.php | 3 | ||||
-rw-r--r-- | ui/include/classes/db/DB.php | 3 | ||||
-rw-r--r-- | ui/include/classes/validators/CApiInputValidator.php | 4 | ||||
-rw-r--r-- | ui/include/triggers.inc.php | 3 |
5 files changed, 7 insertions, 8 deletions
diff --git a/ui/include/classes/api/services/CTriggerGeneral.php b/ui/include/classes/api/services/CTriggerGeneral.php index 6993decfe8a..0a17831081b 100644 --- a/ui/include/classes/api/services/CTriggerGeneral.php +++ b/ui/include/classes/api/services/CTriggerGeneral.php @@ -1395,7 +1395,7 @@ abstract class CTriggerGeneral extends CApiService { * * @throws APIException if error occurred */ - private function implode_expressions(array &$triggers, array $db_triggers, array &$triggers_functions, $inherited) { + private function implode_expressions(array &$triggers, ?array $db_triggers, array &$triggers_functions, $inherited) { $class = get_class($this); switch ($class) { diff --git a/ui/include/classes/core/Manager.php b/ui/include/classes/core/Manager.php index 4bf248d758b..0d6ad693448 100644 --- a/ui/include/classes/core/Manager.php +++ b/ui/include/classes/core/Manager.php @@ -61,7 +61,8 @@ class Manager extends CRegistryFactory { if ($dbversion_status !== '') { $dbversion_status = json_decode($dbversion_status, true); - if (array_key_exists('history_pk', $dbversion_status) && $dbversion_status['history_pk'] == 1) { + if ($dbversion_status !== null && array_key_exists('history_pk', $dbversion_status) + && $dbversion_status['history_pk'] == 1) { $instance->setPrimaryKeysEnabled(); } } diff --git a/ui/include/classes/db/DB.php b/ui/include/classes/db/DB.php index 9044e862622..1fcaadab05e 100644 --- a/ui/include/classes/db/DB.php +++ b/ui/include/classes/db/DB.php @@ -1152,8 +1152,7 @@ class DB { * * @return array */ - private static function applyQueryFilterOptions($table_name, array $options, $table_alias, - array $sql_parts) { + private static function applyQueryFilterOptions($table_name, array $options, $table_alias, array $sql_parts) { $table_schema = self::getSchema($table_name); $pk = self::getPk($table_name); $pk_option = $pk.'s'; diff --git a/ui/include/classes/validators/CApiInputValidator.php b/ui/include/classes/validators/CApiInputValidator.php index 65410f4723f..886adba9a7c 100644 --- a/ui/include/classes/validators/CApiInputValidator.php +++ b/ui/include/classes/validators/CApiInputValidator.php @@ -1962,7 +1962,7 @@ class CApiInputValidator { * * @return bool */ - private static function validateStringsUniqueness($rule, array $data = null, $path = '', &$error = '') { + private static function validateStringsUniqueness($rule, ?array $data, $path, &$error) { // $data can be NULL when API_ALLOW_NULL is set if ($data === null) { return true; @@ -2036,7 +2036,7 @@ class CApiInputValidator { * * @return bool */ - private static function validateObjectsUniqueness($rule, array $data = null, $path = '', &$error = '') { + private static function validateObjectsUniqueness($rule, ?array $data, $path, &$error) { // $data can be NULL when API_ALLOW_NULL is set if ($data === null) { return true; diff --git a/ui/include/triggers.inc.php b/ui/include/triggers.inc.php index a9c359413ca..11228ffca32 100644 --- a/ui/include/triggers.inc.php +++ b/ui/include/triggers.inc.php @@ -1044,8 +1044,7 @@ function analyzeExpression(string $expression, int $type, string &$error = null) * @return array Array containing the trigger expression formula as the first element and an array describing the * expression tree as the second. */ -function buildExpressionHtmlTree(array $expressionTree, array &$next, &$letterNum, $level, $operator, - $type) { +function buildExpressionHtmlTree(array $expressionTree, array &$next, &$letterNum, $level, $operator, $type) { $treeList = []; $outline = ''; |