Passed
Push — main ( cd5745...cfa081 )
by Sílvio
10:20 queued 07:29
created
src/Utils/CacheDriver.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
     }
66 66
 
67 67
     /**
68
-    * @return Cacheer
69
-    */
68
+     * @return Cacheer
69
+     */
70 70
     public function useArrayDriver()
71 71
     {
72 72
         $this->cacheer->cacheStore = new ArrayCacheStore($this->logPath);
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
     /**
77 77
      * @return Cacheer
78
-    */
78
+     */
79 79
     public function useDefaultDriver()
80 80
     {
81 81
         if (!isset($this->cacheer->options['cacheDir'])) {
@@ -92,14 +92,14 @@  discard block
 block discarded – undo
92 92
     }
93 93
 
94 94
     /**
95
-    * @param mixed $dirName
96
-    * @return bool
97
-    */
95
+     * @param mixed $dirName
96
+     * @return bool
97
+     */
98 98
     private function isDir(mixed $dirName)
99 99
     {
100
-      if (is_dir($dirName)) {
101
-          return true;
102
-      }
103
-      return mkdir($dirName, 0755, true);
100
+        if (is_dir($dirName)) {
101
+            return true;
102
+        }
103
+        return mkdir($dirName, 0755, true);
104 104
     }
105 105
 }
Please login to merge, or discard this patch.
src/Helpers/CacheFileHelper.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
 {
15 15
 
16 16
     /**
17
-    * @param string $expiration
18
-    * @return int
19
-    */
17
+     * @param string $expiration
18
+     * @return int
19
+     */
20 20
     public static function convertExpirationToSeconds(string $expiration)
21 21
     {
22 22
         $units = [
@@ -58,10 +58,10 @@  discard block
 block discarded – undo
58 58
     }
59 59
 
60 60
     /**
61
-    * @param string|int $ttl
62
-    * @param int $defaultTTL
63
-    * @return mixed
64
-    */
61
+     * @param string|int $ttl
62
+     * @param int $defaultTTL
63
+     * @return mixed
64
+     */
65 65
     public static function ttl($ttl = null, ?int $defaultTTL = null) {
66 66
         if ($ttl) {
67 67
             $ttl = is_string($ttl) ? self::convertExpirationToSeconds($ttl) : $ttl;
@@ -71,13 +71,13 @@  discard block
 block discarded – undo
71 71
         return $ttl;
72 72
     }
73 73
 
74
-  /**
75
-  * @param mixed $currentCacheData
76
-  * @param mixed $cacheData
77
-  * @return array
78
-  */
79
-  public static function arrayIdentifier(mixed $currentCacheData, mixed $cacheData)
80
-  {
74
+    /**
75
+     * @param mixed $currentCacheData
76
+     * @param mixed $cacheData
77
+     * @return array
78
+     */
79
+    public static function arrayIdentifier(mixed $currentCacheData, mixed $cacheData)
80
+    {
81 81
     return CacheerHelper::arrayIdentifier($currentCacheData, $cacheData);
82
-  }
82
+    }
83 83
 }
Please login to merge, or discard this patch.
src/Helpers/CacheRedisHelper.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -13,20 +13,20 @@  discard block
 block discarded – undo
13 13
 class CacheRedisHelper
14 14
 {
15 15
 
16
-  /**
17
-  * @param mixed $data
18
-  * @param bool  $serialize
19
-  * @return mixed
20
-  */
21
-  public static function serialize(mixed $data, bool $serialize = true)
22
-  {
16
+    /**
17
+     * @param mixed $data
18
+     * @param bool  $serialize
19
+     * @return mixed
20
+     */
21
+    public static function serialize(mixed $data, bool $serialize = true)
22
+    {
23 23
     if($serialize) {
24
-      return serialize($data);
24
+        return serialize($data);
25 25
     }
26 26
 
27 27
     return unserialize($data);
28 28
 
29
-  }
29
+    }
30 30
 
31 31
     /**
32 32
      * @param array $item
@@ -49,15 +49,15 @@  discard block
 block discarded – undo
49 49
         return CacheerHelper::mergeCacheData($cacheData);
50 50
     }
51 51
 
52
-  /**
53
-    * @param mixed $currentCacheData
54
-    * @param mixed $cacheData
55
-    * @return array
56
-    */
57
-  public static function arrayIdentifier(mixed $currentCacheData, mixed $cacheData)
58
-  {
59
-      return CacheerHelper::arrayIdentifier($currentCacheData, $cacheData);
60
-  }
52
+    /**
53
+     * @param mixed $currentCacheData
54
+     * @param mixed $cacheData
55
+     * @return array
56
+     */
57
+    public static function arrayIdentifier(mixed $currentCacheData, mixed $cacheData)
58
+    {
59
+        return CacheerHelper::arrayIdentifier($currentCacheData, $cacheData);
60
+    }
61 61
 
62 62
 }
63 63
 
Please login to merge, or discard this patch.
src/Exceptions/CacheRedisException.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
      */
59 59
     public function toJson(int $options = 0)
60 60
     {
61
-      return parent::toJson($options);
61
+        return parent::toJson($options);
62 62
     }
63 63
 }
64 64
 
Please login to merge, or discard this patch.
src/Exceptions/CacheDatabaseException.php 1 patch
Indentation   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -7,39 +7,39 @@  discard block
 block discarded – undo
7 7
 class CacheDatabaseException extends BaseException
8 8
 {
9 9
 
10
-  /** @param string $before */
11
-  private static string $before = "<Database Cache Store Exception>";
10
+    /** @param string $before */
11
+    private static string $before = "<Database Cache Store Exception>";
12 12
 
13
-  /**
14
-   * @param string $message
15
-   * @param int $code
16
-   * @param Exception|null $previous
17
-   * @param array $details
18
-   * @return self
19
-   */
20
-  public static function create(string $message = "", int $code = 0, ?Exception $previous = null, array $details = [])
21
-  {
13
+    /**
14
+     * @param string $message
15
+     * @param int $code
16
+     * @param Exception|null $previous
17
+     * @param array $details
18
+     * @return self
19
+     */
20
+    public static function create(string $message = "", int $code = 0, ?Exception $previous = null, array $details = [])
21
+    {
22 22
     return new self(self::getBefore() . ": " .$message, $code, $previous, $details);
23
-  }
23
+    }
24 24
 
25 25
 
26
-  /**
27
-  * @return string
28
-  */
29
-  public static function getBefore(): string
30
-  {
26
+    /**
27
+     * @return string
28
+     */
29
+    public static function getBefore(): string
30
+    {
31 31
     return self::$before;
32
-  }
32
+    }
33 33
 
34
-  /**
35
-  * @return void
36
-  */
37
-  public static function setBefore(string $text): void
38
-  {
34
+    /**
35
+     * @return void
36
+     */
37
+    public static function setBefore(string $text): void
38
+    {
39 39
     self::$before = $text;
40
-  }
40
+    }
41 41
 
42
-   /*
42
+    /*
43 43
     * @return array
44 44
     */
45 45
     public function toArray()
@@ -61,6 +61,6 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function toJson(int $options = 0)
63 63
     {
64
-      return parent::toJson($options);
64
+        return parent::toJson($options);
65 65
     }
66 66
 }
Please login to merge, or discard this patch.
src/CacheStore/CacheManager/FileCacheManager.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -15,9 +15,9 @@  discard block
 block discarded – undo
15 15
 {
16 16
 
17 17
     /**
18
-    * @param string $dir
19
-    * @return void
20
-    */
18
+     * @param string $dir
19
+     * @return void
20
+     */
21 21
     public function createDirectory(string $dir)
22 22
     {
23 23
         if ((!file_exists($dir) || !is_dir($dir)) && !mkdir($dir, 0755, true)) {
@@ -26,10 +26,10 @@  discard block
 block discarded – undo
26 26
     }
27 27
 
28 28
     /**
29
-    * @param string $filename
30
-    * @param string $data
31
-    * @return void
32
-    */
29
+     * @param string $filename
30
+     * @param string $data
31
+     * @return void
32
+     */
33 33
     public function writeFile(string $filename, string $data)
34 34
     {
35 35
         if (!@file_put_contents($filename, $data, LOCK_EX)) {
@@ -38,9 +38,9 @@  discard block
 block discarded – undo
38 38
     }
39 39
 
40 40
     /**
41
-    * @param string $filename
42
-    * @return string
43
-    */
41
+     * @param string $filename
42
+     * @return string
43
+     */
44 44
     public function readFile(string $filename)
45 45
     {
46 46
         if (!$this->fileExists($filename)) {
@@ -50,18 +50,18 @@  discard block
 block discarded – undo
50 50
     }
51 51
 
52 52
     /**
53
-    * @param string $filename
54
-    * @return bool
55
-    */
53
+     * @param string $filename
54
+     * @return bool
55
+     */
56 56
     public function fileExists(string $filename)
57 57
     {
58 58
         return file_exists($filename);
59 59
     }
60 60
 
61 61
     /**
62
-    * @param string $filename
63
-    * @return void
64
-    */
62
+     * @param string $filename
63
+     * @return void
64
+     */
65 65
     public function removeFile(string $filename)
66 66
     {
67 67
         if (file_exists($filename)) {
@@ -70,9 +70,9 @@  discard block
 block discarded – undo
70 70
     }
71 71
 
72 72
     /**
73
-    * @param string $dir
74
-    * @return void
75
-    */
73
+     * @param string $dir
74
+     * @return void
75
+     */
76 76
     public function clearDirectory(string $dir)
77 77
     {
78 78
         $iterator = new RecursiveIteratorIterator(
@@ -86,9 +86,9 @@  discard block
 block discarded – undo
86 86
     }
87 87
 
88 88
     /**
89
-    * @param mixed $data
90
-    * @param bool $serialize
91
-    */
89
+     * @param mixed $data
90
+     * @param bool $serialize
91
+     */
92 92
     public function serialize(mixed $data, bool $serialize = true)
93 93
     {
94 94
         if($serialize) {
Please login to merge, or discard this patch.
src/Exceptions/ConnectionException.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
      */
59 59
     public function toJson(int $options = 0)
60 60
     {
61
-      return parent::toJson($options);
61
+        return parent::toJson($options);
62 62
     }
63 63
 }
64 64
 
Please login to merge, or discard this patch.
src/Exceptions/CacheFileException.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@
 block discarded – undo
58 58
      */
59 59
     public function toJson(int $options = 0)
60 60
     {
61
-      return parent::toJson($options);
61
+        return parent::toJson($options);
62 62
     }
63 63
 }
64 64
 
Please login to merge, or discard this patch.