Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberts Lataria <roberts.lataria@zabbix.com>2022-04-13 17:07:44 +0300
committerRoberts Lataria <roberts.lataria@zabbix.com>2022-04-13 17:07:44 +0300
commitc001dcc78886b822898a2a2cf5bd23768e421fc6 (patch)
tree4e3e770c5fe9d06dd3c26c1a4e049747ff392f92
parent78e2d7a0299d486ba9b27e6593bc1ecc6fe1ffb9 (diff)
..F....... [ZBX-20299] fixed code styles
-rw-r--r--ui/app/controllers/CControllerPopupItemTest.php16
-rw-r--r--ui/app/controllers/CControllerPopupItemTestEdit.php2
2 files changed, 8 insertions, 10 deletions
diff --git a/ui/app/controllers/CControllerPopupItemTest.php b/ui/app/controllers/CControllerPopupItemTest.php
index b0b2ce73a16..7efe5eb2c9c 100644
--- a/ui/app/controllers/CControllerPopupItemTest.php
+++ b/ui/app/controllers/CControllerPopupItemTest.php
@@ -1055,13 +1055,12 @@ abstract class CControllerPopupItemTest extends CController {
/**
* Resolve macros used in the calculates item formula.
*
- * @param string $formula Calculated item formula.
+ * @param string $formula Calculated item formula.
+ * @param array $macros_posted Macros.
*
- * @return array
+ * @return string
*/
- private function resolveCalcFormulaMacros(string $formula) {
- $macros_posted = $this->getInput('macros', []);
-
+ private function resolveCalcFormulaMacros(string $formula, array $macros_posted): string {
if (!$macros_posted) {
return $formula;
}
@@ -1135,8 +1134,9 @@ abstract class CControllerPopupItemTest extends CController {
break;
case CFilterParser::TOKEN_TYPE_STRING:
-
- $string = strtr(CFilterParser::unquoteString($filter_token['match']), $macros_posted);
+ $string = strtr(CFilterParser::unquoteString($filter_token['match']),
+ $macros_posted
+ );
$expression[] = CFilterParser::quoteString($string);
break;
}
@@ -1159,7 +1159,7 @@ abstract class CControllerPopupItemTest extends CController {
break;
}
}
- break;
+ break;
}
}
diff --git a/ui/app/controllers/CControllerPopupItemTestEdit.php b/ui/app/controllers/CControllerPopupItemTestEdit.php
index 4a597168c09..18113e66666 100644
--- a/ui/app/controllers/CControllerPopupItemTestEdit.php
+++ b/ui/app/controllers/CControllerPopupItemTestEdit.php
@@ -193,7 +193,6 @@ class CControllerPopupItemTestEdit extends CControllerPopupItemTest {
break;
case CExpressionParserResult::TOKEN_TYPE_HIST_FUNCTION:
-
foreach ($token['data']['parameters'] as $parameter) {
switch ($parameter['type']) {
case CHistFunctionParser::PARAM_TYPE_QUERY:
@@ -224,7 +223,6 @@ class CControllerPopupItemTestEdit extends CControllerPopupItemTest {
break;
}
}
-
break;
}
}