]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/FileUtils.php
namespacing: \Shaarli\FileUtils
[github/shaarli/Shaarli.git] / application / FileUtils.php
index ba409821c03c0b235e0b9ea86151c6bbf30bc911..30560bfc3a929a272a7932c893a7212f5d598da1 100644 (file)
@@ -1,8 +1,8 @@
 <?php
 
-use Shaarli\Exceptions\IOException;
+namespace Shaarli;
 
-require_once 'exceptions/IOException.php';
+use Shaarli\Exceptions\IOException;
 
 /**
  * Class FileUtils
@@ -46,7 +46,7 @@ class FileUtils
 
         return file_put_contents(
             $file,
-            self::$phpPrefix.base64_encode(gzdeflate(serialize($content))).self::$phpSuffix
+            self::$phpPrefix . base64_encode(gzdeflate(serialize($content))) . self::$phpSuffix
         );
     }
 
@@ -64,7 +64,7 @@ class FileUtils
     {
         // Note that gzinflate is faster than gzuncompress.
         // See: http://www.php.net/manual/en/function.gzdeflate.php#96439
-        if (! is_readable($file)) {
+        if (!is_readable($file)) {
             return $default;
         }