]> git.agnieray.net Git - galette.git/blobdiff - galette/lib/Galette/Core/PasswordImage.php
Switch to PSR12, phpcbf fix
[galette.git] / galette / lib / Galette / Core / PasswordImage.php
index 43d138f3c5f8d571eb3f115f002cb0b957378674..8232f207c913905f65419c9e7dabce1662a850d1 100644 (file)
@@ -76,7 +76,8 @@ class PasswordImage extends AbstractPassword
     {
         $dh = @opendir(GALETTE_TEMPIMAGES_PATH);
         while ($file = readdir($dh)) {
-            if (substr($file, 0, 3) == 'pw_'
+            if (
+                substr($file, 0, 3) == 'pw_'
                 && time() - filemtime(GALETTE_TEMPIMAGES_PATH . '/' . $file) > 60
             ) {
                 unlink(GALETTE_TEMPIMAGES_PATH . '/' . $file);
@@ -153,7 +154,7 @@ class PasswordImage extends AbstractPassword
         $this->generateNewPassword();
         $pass = $this->getNewPassword();
 
-        $png = imagecreate(10 + 7.5*strlen($pass), 18);
+        $png = imagecreate(10 + 7.5 * strlen($pass), 18);
         $bg = imagecolorallocate($png, 160, 160, 160);
         imagestring($png, 3, 5, 2, $pass, imagecolorallocate($png, 0, 0, 0));
         $file = GALETTE_TEMPIMAGES_PATH . '/' . $this->getImageName();