summaryrefslogtreecommitdiff
path: root/classes/db/migrations.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/db/migrations.php')
-rw-r--r--classes/db/migrations.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/classes/db/migrations.php b/classes/db/migrations.php
index 5f969c513..ffce2af5f 100644
--- a/classes/db/migrations.php
+++ b/classes/db/migrations.php
@@ -189,14 +189,11 @@ class Db_Migrations {
$filename = "{$this->base_path}/{$this->base_filename}";
if (file_exists($filename)) {
- $lines = array_filter(preg_split("/[\r\n]/", file_get_contents($filename)),
- function ($line) {
- return strlen(trim($line)) > 0 && strpos($line, "--") !== 0;
- });
-
- return array_filter(explode(";", implode("", $lines)), function ($line) {
- return strlen(trim($line)) > 0 && !in_array(strtolower($line), ["begin", "commit"]);
- });
+ $lines = array_filter(preg_split("/[\r\n]/", file_get_contents($filename)),
+ fn($line) => strlen(trim($line)) > 0 && strpos($line, "--") !== 0);
+
+ return array_filter(explode(";", implode("", $lines)),
+ fn($line) => strlen(trim($line)) > 0 && !in_array(strtolower($line), ["begin", "commit"]));
} else {
user_error("Requested schema file ${filename} not found.", E_USER_ERROR);