Skip to content

Commit 693afcc

Browse files
style: apply php-cs-fixer to tests/bootstrap.php
1 parent bbc07c6 commit 693afcc

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

tests/bootstrap.php

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,48 +12,50 @@
1212
* can be loaded in isolation without the full Cacti application.
1313
*/
1414

15-
$GLOBALS['__test_db_calls'] = array();
16-
$GLOBALS['config'] = array(
15+
$GLOBALS['__test_db_calls'] = [];
16+
$GLOBALS['config'] = [
1717
'base_path' => '/var/www/html/cacti',
1818
'url_path' => '/cacti/',
1919
'cacti_version' => '1.2.999',
20-
);
20+
];
2121

2222
if (!function_exists('db_execute')) {
2323
function db_execute($sql) {
24-
$GLOBALS['__test_db_calls'][] = array('fn' => 'db_execute', 'sql' => $sql, 'params' => array());
24+
$GLOBALS['__test_db_calls'][] = ['fn' => 'db_execute', 'sql' => $sql, 'params' => []];
25+
2526
return true;
2627
}
2728
}
2829

2930
if (!function_exists('db_execute_prepared')) {
30-
function db_execute_prepared($sql, $params = array()) {
31-
$GLOBALS['__test_db_calls'][] = array('fn' => 'db_execute_prepared', 'sql' => $sql, 'params' => $params);
31+
function db_execute_prepared($sql, $params = []) {
32+
$GLOBALS['__test_db_calls'][] = ['fn' => 'db_execute_prepared', 'sql' => $sql, 'params' => $params];
33+
3234
return true;
3335
}
3436
}
3537

3638
if (!function_exists('db_fetch_assoc')) {
3739
function db_fetch_assoc($sql) {
38-
return array();
40+
return [];
3941
}
4042
}
4143

4244
if (!function_exists('db_fetch_assoc_prepared')) {
43-
function db_fetch_assoc_prepared($sql, $params = array()) {
44-
return array();
45+
function db_fetch_assoc_prepared($sql, $params = []) {
46+
return [];
4547
}
4648
}
4749

4850
if (!function_exists('db_fetch_row')) {
4951
function db_fetch_row($sql) {
50-
return array();
52+
return [];
5153
}
5254
}
5355

5456
if (!function_exists('db_fetch_row_prepared')) {
55-
function db_fetch_row_prepared($sql, $params = array()) {
56-
return array();
57+
function db_fetch_row_prepared($sql, $params = []) {
58+
return [];
5759
}
5860
}
5961

@@ -64,7 +66,7 @@ function db_fetch_cell($sql) {
6466
}
6567

6668
if (!function_exists('db_fetch_cell_prepared')) {
67-
function db_fetch_cell_prepared($sql, $params = array()) {
69+
function db_fetch_cell_prepared($sql, $params = []) {
6870
return '';
6971
}
7072
}

0 commit comments

Comments
 (0)