Skip to content

Commit 82f43cb

Browse files
authored
Apply fixes from StyleCI (librenms#12120)
1 parent 77c5315 commit 82f43cb

File tree

1,733 files changed

+18331
-18534
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,733 files changed

+18331
-18534
lines changed

LibreNMS/Util/CiHelper.php

+1
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ public function checkStyle()
208208

209209
// Disabled in favor of styleci
210210
echo "Style check disabled.\n";
211+
211212
return 0;
212213

213214
$cs_cmd = [

includes/billing.php

+170-173
Large diffs are not rendered by default.

includes/caches/alerts.inc.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
22

33
if (Auth::user()->hasGlobalRead()) {
4-
$data['active_count'] = array('query' => 'SELECT COUNT(`alerts`.`id`) FROM `alerts` LEFT JOIN `devices` ON `alerts`.`device_id`=`devices`.`device_id` RIGHT JOIN `alert_rules` ON `alerts`.`rule_id`=`alert_rules`.`id` WHERE 1 AND `alerts`.`state` NOT IN (0,2) AND `devices`.`disabled` = 0 AND `devices`.`ignore` = 0');
4+
$data['active_count'] = ['query' => 'SELECT COUNT(`alerts`.`id`) FROM `alerts` LEFT JOIN `devices` ON `alerts`.`device_id`=`devices`.`device_id` RIGHT JOIN `alert_rules` ON `alerts`.`rule_id`=`alert_rules`.`id` WHERE 1 AND `alerts`.`state` NOT IN (0,2) AND `devices`.`disabled` = 0 AND `devices`.`ignore` = 0'];
55
} else {
66
$device_ids = Permissions::devicesForUser()->toArray() ?: [0];
7-
$perms_sql = "`D`.`device_id` IN " .dbGenPlaceholders(count($device_ids));
7+
$perms_sql = "`D`.`device_id` IN " . dbGenPlaceholders(count($device_ids));
88

9-
$data['active_count'] = array(
9+
$data['active_count'] = [
1010
'query' => 'SELECT COUNT(`alerts`.`id`) FROM `alerts` LEFT JOIN `devices` ON `alerts`.`device_id`=`devices`.`device_id` RIGHT JOIN `alert_rules` ON `alerts`.`rule_id`=`alert_rules`.`id` WHERE $perms_sql AND `alerts`.`state` NOT IN (0,2) AND `devices`.`disabled` = 0 AND `devices`.`ignore` = 0',
11-
'params' => $device_ids
12-
);
11+
'params' => $device_ids,
12+
];
1313
}

includes/caches/devices.inc.php

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
<?php
22

33
if (Auth::user()->hasGlobalRead()) {
4-
$data['count'] = array('query' => 'SELECT COUNT(*) FROM devices');
4+
$data['count'] = ['query' => 'SELECT COUNT(*) FROM devices'];
55

6-
$data['up'] = array('query' => "SELECT COUNT(*) FROM devices WHERE `status` = '1' AND `ignore` = '0' AND `disabled` = '0'",);
6+
$data['up'] = ['query' => "SELECT COUNT(*) FROM devices WHERE `status` = '1' AND `ignore` = '0' AND `disabled` = '0'"];
77

8-
$data['down'] = array('query' => "SELECT COUNT(*) FROM devices WHERE `status` = '0' AND `ignore` = '0' AND `disabled` = '0'");
8+
$data['down'] = ['query' => "SELECT COUNT(*) FROM devices WHERE `status` = '0' AND `ignore` = '0' AND `disabled` = '0'"];
99

10-
$data['ignored'] = array('query' => "SELECT COUNT(*) FROM devices WHERE `ignore` = '1' AND `disabled` = '0'");
10+
$data['ignored'] = ['query' => "SELECT COUNT(*) FROM devices WHERE `ignore` = '1' AND `disabled` = '0'"];
1111

12-
$data['disabled'] = array('query' => "SELECT COUNT(*) FROM devices WHERE `disabled` = '1'");
12+
$data['disabled'] = ['query' => "SELECT COUNT(*) FROM devices WHERE `disabled` = '1'"];
1313
} else {
1414
$device_ids = Permissions::devicesForUser()->toArray() ?: [0];
15-
$perms_sql = "`D`.`device_id` IN " .dbGenPlaceholders(count($device_ids));
15+
$perms_sql = "`D`.`device_id` IN " . dbGenPlaceholders(count($device_ids));
1616

17-
$data['count'] = array(
17+
$data['count'] = [
1818
'query' => 'SELECT COUNT(*) FROM devices AS D WHERE $perms_sql',
19-
'params' => $device_ids
20-
);
19+
'params' => $device_ids,
20+
];
2121

22-
$data['up'] = array(
22+
$data['up'] = [
2323
'query' => "SELECT COUNT(*) FROM devices AS D WHERE $perms_sql AND D.`status` = '1' AND D.`ignore` = '0' AND D.`disabled` = '0'",
24-
'params' => $device_ids
25-
);
24+
'params' => $device_ids,
25+
];
2626

27-
$data['down'] = array(
27+
$data['down'] = [
2828
'query' => "SELECT COUNT(*) FROM devices AS D WHERE $perms_sql AND D.`status` = '0' AND D.`ignore` = '0' AND D.`disabled` = '0'",
29-
'params' => $device_ids
30-
);
29+
'params' => $device_ids,
30+
];
3131

32-
$data['ignored'] = array(
32+
$data['ignored'] = [
3333
'query' => "SELECT COUNT(*) FROM devices AS D WHERE $perms_sql AND D.`ignore` = '1' AND D.`disabled` = '0'",
34-
'params' => $device_ids
35-
);
34+
'params' => $device_ids,
35+
];
3636

37-
$data['disabled'] = array(
37+
$data['disabled'] = [
3838
'query' => "SELECT COUNT(*) FROM devices AS D WHERE $perms_sql AND D.`disabled` = '1'",
39-
'params' => $device_ids
40-
);
39+
'params' => $device_ids,
40+
];
4141
}//end if

includes/caches/notifications.inc.php

+13-14
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,25 @@
2121
* @package LibreNMS
2222
* @subpackage Notifications
2323
*/
24-
25-
$data['count'] = array(
24+
$data['count'] = [
2625
'query' => 'select count(notifications.notifications_id) from notifications where not exists( select 1 from notifications_attribs where notifications.notifications_id = notifications_attribs.notifications_id and notifications_attribs.user_id = ?)',
27-
'params' => array( Auth::id() )
28-
);
26+
'params' => [Auth::id()],
27+
];
2928

30-
$data['unread'] = array(
29+
$data['unread'] = [
3130
'query' => 'select notifications.* from notifications where not exists( select 1 from notifications_attribs where notifications.notifications_id = notifications_attribs.notifications_id and notifications_attribs.user_id = ?) order by notifications.notifications_id desc',
32-
'params' => array( Auth::id() )
33-
);
31+
'params' => [Auth::id()],
32+
];
3433

35-
$data['sticky'] = array(
34+
$data['sticky'] = [
3635
'query' => 'select notifications.*,notifications_attribs.user_id from notifications inner join notifications_attribs on notifications.notifications_id = notifications_attribs.notifications_id where notifications_attribs.key = "sticky" && notifications_attribs.value = 1 order by notifications_attribs.attrib_id desc',
37-
);
36+
];
3837

39-
$data['sticky_count'] = array(
38+
$data['sticky_count'] = [
4039
'query' => 'select count(notifications.notifications_id) from notifications inner join notifications_attribs on notifications.notifications_id = notifications_attribs.notifications_id where notifications_attribs.key = "sticky" && notifications_attribs.value = 1',
41-
);
40+
];
4241

43-
$data['read'] = array(
42+
$data['read'] = [
4443
'query' => 'select notifications.* from notifications inner join notifications_attribs on notifications.notifications_id = notifications_attribs.notifications_id where notifications_attribs.user_id = ? && ( notifications_attribs.key = "read" && notifications_attribs.value = 1) && not exists( select 1 from notifications_attribs where notifications.notifications_id = notifications_attribs.notifications_id and notifications_attribs.key = "sticky" && notifications_attribs.value = "1") order by notifications_attribs.attrib_id desc',
45-
'params' => array( Auth::id() )
46-
);
44+
'params' => [Auth::id()],
45+
];

includes/caches/ports.inc.php

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,48 @@
11
<?php
22

33
if (Auth::user()->hasGlobalRead()) {
4-
$data['count'] = array('query' => "SELECT COUNT(*) FROM ports WHERE `deleted` = '0'");
4+
$data['count'] = ['query' => "SELECT COUNT(*) FROM ports WHERE `deleted` = '0'"];
55

6-
$data['up'] = array('query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE I.`deleted` = '0' AND D.`device_id` = I.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND I.`ifOperStatus` = 'up'",);
6+
$data['up'] = ['query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE I.`deleted` = '0' AND D.`device_id` = I.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND I.`ifOperStatus` = 'up'"];
77

8-
$data['down'] = array('query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE I.`deleted` = '0' AND D.`device_id` = I.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND I.`ifOperStatus` <> 'up' AND I.`ifAdminStatus` = 'up'");
8+
$data['down'] = ['query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE I.`deleted` = '0' AND D.`device_id` = I.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND I.`ifOperStatus` <> 'up' AND I.`ifAdminStatus` = 'up'"];
99

10-
$data['shutdown'] = array('query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE I.`deleted` = '0' AND D.`device_id` = I.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND I.`ifAdminStatus` = 'down'");
10+
$data['shutdown'] = ['query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE I.`deleted` = '0' AND D.`device_id` = I.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND I.`ifAdminStatus` = 'down'"];
1111

12-
$data['errored'] = array('query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE I.`deleted` = '0' AND D.`device_id` = I.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND (I.`ifInErrors_delta` > '0' OR I.`ifOutErrors_delta` > '0')");
12+
$data['errored'] = ['query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE I.`deleted` = '0' AND D.`device_id` = I.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND (I.`ifInErrors_delta` > '0' OR I.`ifOutErrors_delta` > '0')"];
1313

14-
$data['ignored'] = array('query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE I.`deleted` = '0' AND D.`device_id` = I.`device_id` AND (I.`ignore` = '1' OR D.`ignore` = '1')");
14+
$data['ignored'] = ['query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE I.`deleted` = '0' AND D.`device_id` = I.`device_id` AND (I.`ignore` = '1' OR D.`ignore` = '1')"];
1515
} else {
1616
$device_ids = Permissions::portsForUser()->toArray() ?: [0];
17-
$perms_sql = "`I`.`port_id` IN " .dbGenPlaceholders(count($device_ids));
17+
$perms_sql = "`I`.`port_id` IN " . dbGenPlaceholders(count($device_ids));
1818

19-
$data['count'] = array(
19+
$data['count'] = [
2020
'query' => "SELECT COUNT(*) FROM ports AS I WHERE $perms_sql AND I.`deleted` = '0'",
21-
'params' => $device_ids
22-
);
21+
'params' => $device_ids,
22+
];
2323

24-
$data['up'] = array(
24+
$data['up'] = [
2525
'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE $perms_sql AND I.`deleted` = '0' AND I.`device_id` = D.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND I.`ifOperStatus` = 'up'",
26-
'params' => $device_ids
27-
);
26+
'params' => $device_ids,
27+
];
2828

29-
$data['down'] = array(
29+
$data['down'] = [
3030
'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE $perms_sql AND I.`deleted` = '0' AND I.`device_id` = D.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND I.`ifOperStatus` <> 'up' AND I.`ifAdminStatus` = 'up'",
31-
'params' => $device_ids
32-
);
31+
'params' => $device_ids,
32+
];
3333

34-
$data['shutdown'] = array(
34+
$data['shutdown'] = [
3535
'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE $perms_sql AND I.`deleted` = '0' AND I.`device_id` = D.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND I.`ifAdminStatus` = 'down'",
36-
'params' => $device_ids
37-
);
36+
'params' => $device_ids,
37+
];
3838

39-
$data['errored'] = array(
39+
$data['errored'] = [
4040
'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE $perms_sql AND I.`deleted` = '0' AND I.`device_id` = D.`device_id` AND I.`ignore` = '0' AND D.`ignore` = '0' AND (I.`ifInErrors_delta` > '0' OR I.`ifOutErrors_delta` > '0')",
41-
'params' => $device_ids
42-
);
41+
'params' => $device_ids,
42+
];
4343

44-
$data['ignored'] = array(
44+
$data['ignored'] = [
4545
'query' => "SELECT COUNT(*) FROM ports AS I, devices AS D WHERE $perms_sql AND I.`deleted` = '0' AND I.`device_id` = D.`device_id` AND (I.`ignore` = '1' OR D.`ignore` = '1')",
46-
'params' => $device_ids
47-
);
46+
'params' => $device_ids,
47+
];
4848
}//end if

includes/caches/services.inc.php

+21-21
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
<?php
22

33
if (Auth::user()->hasGlobalRead()) {
4-
$data['count'] = array( 'query' => 'SELECT COUNT(*) FROM services');
5-
$data['up'] = array( 'query' => "SELECT COUNT(*) FROM services WHERE `service_ignore` = '0' AND `service_disabled` = '0' AND `service_status` = '0'");
6-
$data['down'] = array( 'query' => "SELECT COUNT(*) FROM services WHERE `service_ignore` = '0' AND `service_disabled` = '0' AND `service_status` = '2'");
7-
$data['ignored'] = array( 'query' => "SELECT COUNT(*) FROM services WHERE `service_ignore` = '1' AND `service_disabled` = '0'");
8-
$data['disabled'] = array( 'query' => "SELECT COUNT(*) FROM services WHERE `service_disabled` = '1'");
4+
$data['count'] = ['query' => 'SELECT COUNT(*) FROM services'];
5+
$data['up'] = ['query' => "SELECT COUNT(*) FROM services WHERE `service_ignore` = '0' AND `service_disabled` = '0' AND `service_status` = '0'"];
6+
$data['down'] = ['query' => "SELECT COUNT(*) FROM services WHERE `service_ignore` = '0' AND `service_disabled` = '0' AND `service_status` = '2'"];
7+
$data['ignored'] = ['query' => "SELECT COUNT(*) FROM services WHERE `service_ignore` = '1' AND `service_disabled` = '0'"];
8+
$data['disabled'] = ['query' => "SELECT COUNT(*) FROM services WHERE `service_disabled` = '1'"];
99
} else {
1010
$device_ids = Permissions::devicesForUser()->toArray() ?: [0];
11-
$perms_sql = "`S`.`device_id` IN " .dbGenPlaceholders(count($device_ids));
11+
$perms_sql = "`S`.`device_id` IN " . dbGenPlaceholders(count($device_ids));
1212

13-
$data['count'] = array(
13+
$data['count'] = [
1414
'query' => 'SELECT COUNT(*) FROM services AS S WHERE $perms_sql',
15-
'params' => $device_ids
16-
);
15+
'params' => $device_ids,
16+
];
1717

18-
$data['up'] = array(
18+
$data['up'] = [
1919
'query' => "SELECT COUNT(*) FROM services AS S WHERE $perms_sql AND S.`service_ignore` = '0' AND S.`service_disabled` = '0' AND S.`service_status` = '0'",
20-
'params' => $device_ids
21-
);
20+
'params' => $device_ids,
21+
];
2222

23-
$data['down'] = array(
23+
$data['down'] = [
2424
'query' => "SELECT COUNT(*) FROM services AS S WHERE $perms_sql AND S.`service_ignore` = '0' AND S.`service_disabled` = '0' AND S.`service_status` = '2'",
25-
'params' => $device_ids
26-
);
25+
'params' => $device_ids,
26+
];
2727

28-
$data['ignored'] = array(
28+
$data['ignored'] = [
2929
'query' => "SELECT COUNT(*) FROM services AS S WHERE $perms_sql AND S.`service_ignore` = '1' AND S.`service_disabled` = '0'",
30-
'params' => $device_ids
31-
);
30+
'params' => $device_ids,
31+
];
3232

33-
$data['disabled'] = array(
33+
$data['disabled'] = [
3434
'query' => "SELECT COUNT(*) FROM services AS S WHERE $perms_sql AND S.`service_disabled` = '1'",
35-
'params' => $device_ids
36-
);
35+
'params' => $device_ids,
36+
];
3737
}//end if

includes/caches/toner.inc.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<?php
22

33
if (Auth::user()->hasGlobalRead()) {
4-
$data['count'] = array('query' => "SELECT COUNT(`toner_id`) FROM toner");
4+
$data['count'] = ['query' => "SELECT COUNT(`toner_id`) FROM toner"];
55
} else {
66
$device_ids = Permissions::devicesForUser()->toArray() ?: [0];
7-
$perms_sql = "`toner`.`device_id` IN " .dbGenPlaceholders(count($device_ids));
7+
$perms_sql = "`toner`.`device_id` IN " . dbGenPlaceholders(count($device_ids));
88

9-
$data['count'] = array(
9+
$data['count'] = [
1010
'query' => "SELECT COUNT(`toner_id`) FROM toner WHERE $perms_sql",
11-
'params' => $device_ids
12-
);
11+
'params' => $device_ids,
12+
];
1313
}

includes/callback.php

+19-20
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515
$enabled = dbFetchCell("SELECT `value` FROM `callback` WHERE `name` = 'enabled'");
1616
if ($enabled == 1) {
1717
if (dbFetchCell("SELECT `value` FROM `callback` WHERE `name` = 'uuid'") == '') {
18-
dbInsert(array('name' => 'uuid', 'value' => guidv4(openssl_random_pseudo_bytes(16))), 'callback');
18+
dbInsert(['name' => 'uuid', 'value' => guidv4(openssl_random_pseudo_bytes(16))], 'callback');
1919
}
2020

2121
$uuid = dbFetchCell("SELECT `value` FROM `callback` WHERE `name` = 'uuid'");
2222

2323
$version = version_info();
24-
$queries = array(
24+
$queries = [
2525
'alert_rules' => 'SELECT COUNT(*) AS `total`,`severity` FROM `alert_rules` WHERE `disabled`=0 GROUP BY `severity`',
2626
'alert_templates' => 'SELECT COUNT(*) AS `total` FROM `alert_templates`',
2727
'api_tokens' => 'SELECT COUNT(*) AS `total` FROM `api_tokens` WHERE `disabled`=0',
@@ -63,17 +63,16 @@
6363
'vmware' => 'SELECT COUNT(*) AS `total` FROM `vminfo`',
6464
'vrfs' => 'SELECT COUNT(*) AS `total` FROM `vrfs`',
6565
'mysql_version' => 'SELECT 1 AS `total`, @@version AS `version`',
66-
);
67-
66+
];
6867

6968
foreach ($queries as $name => $query) {
70-
$data = dbFetchRows($query);
69+
$data = dbFetchRows($query);
7170
$response[$name] = $data;
7271
}
73-
$response['php_version'][] = array('total' => 1, 'version' => $version['php_ver']);
74-
$response['python_version'][] = ['total' => 1, 'version' => $version['python_ver']];
75-
$response['rrdtool_version'][] = array('total' => 1, 'version' => $version['rrdtool_ver']);
76-
$response['netsnmp_version'][] = array('total' => 1, 'version' => $version['netsnmp_ver']);
72+
$response['php_version'][] = ['total' => 1, 'version' => $version['php_ver']];
73+
$response['python_version'][] = ['total' => 1, 'version' => $version['python_ver']];
74+
$response['rrdtool_version'][] = ['total' => 1, 'version' => $version['rrdtool_ver']];
75+
$response['netsnmp_version'][] = ['total' => 1, 'version' => $version['netsnmp_ver']];
7776

7877
// collect sysDescr and sysObjectID for submission
7978
$device_info = dbFetchRows('SELECT COUNT(*) AS `count`,`os`, `sysDescr`, `sysObjectID` FROM `devices`
@@ -83,12 +82,12 @@
8382
$device_info = array_map(function ($entry) {
8483
// remove hostnames from linux, macosx, and SunOS
8584
$entry['sysDescr'] = preg_replace_callback('/^(Linux |Darwin |FreeBSD |SunOS )[A-Za-z0-9._\-]+ ([0-9.]{3,9})/', function ($matches) {
86-
return $matches[1] . 'hostname ' .$matches[2];
85+
return $matches[1] . 'hostname ' . $matches[2];
8786
}, $entry['sysDescr']);
8887

8988
// wipe serial numbers, preserve the format
90-
$sn_patterns = array('/[A-Z]/', '/[a-z]/', '/[0-9]/');
91-
$sn_replacements = array('A', 'a', '0');
89+
$sn_patterns = ['/[A-Z]/', '/[a-z]/', '/[0-9]/'];
90+
$sn_replacements = ['A', 'a', '0'];
9291
$entry['sysDescr'] = preg_replace_callback(
9392
'/((s\/?n|serial num(ber)?)[:=]? ?)([a-z0-9.\-]{4,16})/i',
9493
function ($matches) use ($sn_patterns, $sn_replacements) {
@@ -100,17 +99,17 @@ function ($matches) use ($sn_patterns, $sn_replacements) {
10099
return $entry;
101100
}, $device_info);
102101

103-
$output = array(
102+
$output = [
104103
'uuid' => $uuid,
105104
'data' => $response,
106105
'info' => $device_info,
107-
);
108-
$data = json_encode($output);
109-
$submit = array('data' => $data);
106+
];
107+
$data = json_encode($output);
108+
$submit = ['data' => $data];
110109

111110
$fields = '';
112111
foreach ($submit as $key => $value) {
113-
$fields .= $key.'='.$value.'&';
112+
$fields .= $key . '=' . $value . '&';
114113
}
115114

116115
rtrim($fields, '&');
@@ -123,7 +122,7 @@ function ($matches) use ($sn_patterns, $sn_replacements) {
123122
curl_setopt($post, CURLOPT_RETURNTRANSFER, 1);
124123
$result = curl_exec($post);
125124
} elseif ($enabled == 2) {
126-
$uuid = dbFetchCell("SELECT `value` FROM `callback` WHERE `name` = 'uuid'");
125+
$uuid = dbFetchCell("SELECT `value` FROM `callback` WHERE `name` = 'uuid'");
127126
$fields = "uuid=$uuid";
128127

129128
$clear = curl_init();
@@ -133,6 +132,6 @@ function ($matches) use ($sn_patterns, $sn_replacements) {
133132
curl_setopt($clear, CURLOPT_POSTFIELDS, $fields);
134133
curl_setopt($clear, CURLOPT_RETURNTRANSFER, 1);
135134
$result = curl_exec($clear);
136-
dbDelete('callback', '`name`="uuid"', array());
137-
dbUpdate(array('value' => '0'), 'callback', '`name` = "enabled"', array());
135+
dbDelete('callback', '`name`="uuid"', []);
136+
dbUpdate(['value' => '0'], 'callback', '`name` = "enabled"', []);
138137
}

0 commit comments

Comments
 (0)