]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/legacy/LegacyUpdater.php
Apply PHP Code Beautifier on source code for linter automatic fixes
[github/shaarli/Shaarli.git] / application / legacy / LegacyUpdater.php
index ed949b1e5ae89b788f38f80c4ffc5d71360c947f..9bda54b8dd87ee9e6b0ef202ae7f136440568857 100644 (file)
@@ -93,7 +93,7 @@ class LegacyUpdater
      */
     public function update()
     {
-        $updatesRan = array();
+        $updatesRan = [];
 
         // If the user isn't logged in, exit without updating.
         if ($this->isLoggedIn !== true) {
@@ -106,7 +106,8 @@ class LegacyUpdater
 
         foreach ($this->methods as $method) {
             // Not an update method or already done, pass.
-            if (!startsWith($method->getName(), 'updateMethod')
+            if (
+                !startsWith($method->getName(), 'updateMethod')
                 || in_array($method->getName(), $this->doneUpdates)
             ) {
                 continue;
@@ -189,7 +190,7 @@ class LegacyUpdater
         }
 
         // Set sub config keys (config and plugins)
-        $subConfig = array('config', 'plugins');
+        $subConfig = ['config', 'plugins'];
         foreach ($subConfig as $sub) {
             foreach ($oldConfig[$sub] as $key => $value) {
                 if (isset($legacyMap[$sub . '.' . $key])) {
@@ -259,7 +260,7 @@ class LegacyUpdater
         $save = $this->conf->get('resource.data_dir') . '/datastore.' . date('YmdHis') . '.php';
         copy($this->conf->get('resource.datastore'), $save);
 
-        $links = array();
+        $links = [];
         foreach ($this->linkDB as $offset => $value) {
             $links[] = $value;
             unset($this->linkDB[$offset]);
@@ -498,7 +499,8 @@ class LegacyUpdater
      */
     public function updateMethodDownloadSizeAndTimeoutConf()
     {
-        if ($this->conf->exists('general.download_max_size')
+        if (
+            $this->conf->exists('general.download_max_size')
             && $this->conf->exists('general.download_timeout')
         ) {
             return true;