]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/front/controller/visitor/InstallController.php
Apply PHP Code Beautifier on source code for linter automatic fixes
[github/shaarli/Shaarli.git] / application / front / controller / visitor / InstallController.php
index 223292946657169ebd1f42d82afcc5c4971bd46e..bf96592949370026d888ae96f3e155dad483a8b3 100644 (file)
@@ -39,7 +39,8 @@ class InstallController extends ShaarliVisitorController
         // Before installation, we'll make sure that permissions are set properly, and sessions are working.
         $this->checkPermissions();
 
-        if (static::SESSION_TEST_VALUE
+        if (
+            static::SESSION_TEST_VALUE
             !== $this->container->sessionManager->getSessionParameter(static::SESSION_TEST_KEY)
         ) {
             $this->container->sessionManager->setSessionParameter(static::SESSION_TEST_KEY, static::SESSION_TEST_VALUE);
@@ -75,17 +76,18 @@ class InstallController extends ShaarliVisitorController
         // This part makes sure sessions works correctly.
         // (Because on some hosts, session.save_path may not be set correctly,
         // or we may not have write access to it.)
-        if (static::SESSION_TEST_VALUE
+        if (
+            static::SESSION_TEST_VALUE
             !== $this->container->sessionManager->getSessionParameter(static::SESSION_TEST_KEY)
         ) {
             // Step 2: Check if data in session is correct.
             $msg = t(
-                '<pre>Sessions do not seem to work correctly on your server.<br>'.
-                'Make sure the variable "session.save_path" is set correctly in your PHP config, '.
-                'and that you have write access to it.<br>'.
-                'It currently points to %s.<br>'.
-                'On some browsers, accessing your server via a hostname like \'localhost\' '.
-                'or any custom hostname without a dot causes cookie storage to fail. '.
+                '<pre>Sessions do not seem to work correctly on your server.<br>' .
+                'Make sure the variable "session.save_path" is set correctly in your PHP config, ' .
+                'and that you have write access to it.<br>' .
+                'It currently points to %s.<br>' .
+                'On some browsers, accessing your server via a hostname like \'localhost\' ' .
+                'or any custom hostname without a dot causes cookie storage to fail. ' .
                 'We recommend accessing your server via it\'s IP address or Fully Qualified Domain Name.<br>'
             );
             $msg = sprintf($msg, $this->container->sessionManager->getSavePath());
@@ -104,7 +106,8 @@ class InstallController extends ShaarliVisitorController
     public function save(Request $request, Response $response): Response
     {
         $timezone = 'UTC';
-        if (!empty($request->getParam('continent'))
+        if (
+            !empty($request->getParam('continent'))
             && !empty($request->getParam('city'))
             && isTimeZoneValid($request->getParam('continent'), $request->getParam('city'))
         ) {
@@ -114,7 +117,7 @@ class InstallController extends ShaarliVisitorController
 
         $login = $request->getParam('setlogin');
         $this->container->conf->set('credentials.login', $login);
-        $salt = sha1(uniqid('', true) .'_'. mt_rand());
+        $salt = sha1(uniqid('', true) . '_' . mt_rand());
         $this->container->conf->set('credentials.salt', $salt);
         $this->container->conf->set('credentials.hash', sha1($request->getParam('setpassword') . $login . $salt));
 
@@ -123,7 +126,7 @@ class InstallController extends ShaarliVisitorController
         } else {
             $this->container->conf->set(
                 'general.title',
-                'Shared bookmarks on '.escape(index_url($this->container->environment))
+                'Shared bookmarks on ' . escape(index_url($this->container->environment))
             );
         }