refactor: Refactor fix php codesniffer 3.x issues (#7816)

We cannot use 3.x because it  requires php 5.4, so update to 2.9.1 or newer 2.x release.
This commit is contained in:
Tony Murray
2017-11-29 02:23:19 -06:00
committed by Neil Lathwood
parent ce913cd8d3
commit d6db01abb5
23 changed files with 231 additions and 171 deletions

View File

@@ -80,7 +80,7 @@ if (empty($rule)) {
$_POST['target'] = $target;
$_POST['map_id'] = '';
include 'create-map-item.inc.php';
unset($ret,$target,$raw,$rule,$msg,$map_id);
unset($ret, $target, $raw, $rule, $msg, $map_id);
}
}
} else {

View File

@@ -50,7 +50,7 @@ if (file_exists($config['install_dir']."/includes/alerts/transport.".$transport.
$opts = $config['alert']['transports'][$transport];
if ($opts) {
eval('$tmp = function($obj,$opts) { global $config; '.file_get_contents($config['install_dir'].'/includes/alerts/transport.'.$transport.'.php').' return false; };');
$tmp = $tmp($obj,$opts);
$tmp = $tmp($obj, $opts);
if ($tmp) {
$status = 'ok';
}