mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
Use short array declaration
This commit is contained in:
@@ -42,7 +42,7 @@ class ConnectionTest implements ControllerProviderInterface
|
||||
$connection_ok = $db_ok = $is_databox = $is_appbox = $empty = false;
|
||||
|
||||
try {
|
||||
$conn = new \connection_pdo('test', $hostname, $port, $user, $password, null, array(), false);
|
||||
$conn = new \connection_pdo('test', $hostname, $port, $user, $password, null, [], false);
|
||||
$connection_ok = true;
|
||||
} catch (\Exception $e) {
|
||||
|
||||
@@ -50,7 +50,7 @@ class ConnectionTest implements ControllerProviderInterface
|
||||
|
||||
if ($dbname && $connection_ok === true) {
|
||||
try {
|
||||
$conn = new \connection_pdo('test', $hostname, $port, $user, $password, $dbname, array(), false);
|
||||
$conn = new \connection_pdo('test', $hostname, $port, $user, $password, $dbname, [], false);
|
||||
$db_ok = true;
|
||||
|
||||
$sql = "SHOW TABLE STATUS";
|
||||
@@ -75,13 +75,13 @@ class ConnectionTest implements ControllerProviderInterface
|
||||
}
|
||||
}
|
||||
|
||||
$datas = array(
|
||||
$datas = [
|
||||
'connection' => $connection_ok
|
||||
, 'database' => $db_ok
|
||||
, 'is_empty' => $empty
|
||||
, 'is_appbox' => $is_appbox
|
||||
, 'is_databox' => $is_databox
|
||||
);
|
||||
];
|
||||
|
||||
return $app->json($datas);
|
||||
});
|
||||
|
Reference in New Issue
Block a user