Passed
Pull Request — main (#27)
by Sílvio
02:44
created
src/Interface/CacheerInterface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,8 +9,8 @@
 block discarded – undo
9 9
  */
10 10
 interface CacheerInterface
11 11
 {
12
-    public function getCache(string $cacheKey, string $namespace = '', string|int $ttl = 3600);
13
-    public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', int|string $ttl = 3600);
12
+    public function getCache(string $cacheKey, string $namespace = '', string | int $ttl = 3600);
13
+    public function putCache(string $cacheKey, mixed $cacheData, string $namespace = '', int | string $ttl = 3600);
14 14
     public function flushCache();
15 15
     public function clearCache(string $cacheKey, string $namespace = '');
16 16
     public function has(string $cacheKey, string $namespace = '');
Please login to merge, or discard this patch.
src/Helpers/CacheRedisHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
   */
20 20
   public static function serialize(mixed $data, bool $serialize = true)
21 21
   {
22
-    if($serialize) {
22
+    if ($serialize) {
23 23
       return serialize($data);
24 24
     }
25 25
 
Please login to merge, or discard this patch.
src/CacheStore/CacheManager/RedisCacheManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
   */
38 38
   private static function auth()
39 39
   {
40
-    if(is_string(REDIS_CONNECTION_CONFIG['REDIS_PASSWORD']) && REDIS_CONNECTION_CONFIG['REDIS_PASSWORD'] !== '') {
40
+    if (is_string(REDIS_CONNECTION_CONFIG['REDIS_PASSWORD']) && REDIS_CONNECTION_CONFIG['REDIS_PASSWORD'] !== '') {
41 41
       self::$redis->auth(REDIS_CONNECTION_CONFIG['REDIS_PASSWORD']);
42 42
     }
43 43
   }
Please login to merge, or discard this patch.
src/CacheStore/CacheManager/FileCacheManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
     */
78 78
     public function serialize(mixed $data, bool $serealize = true)
79 79
     {
80
-        if($serealize) {
80
+        if ($serealize) {
81 81
             return serialize($data);
82 82
         }
83 83
         return unserialize($data);
Please login to merge, or discard this patch.
src/Exceptions/CacheRedisException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
   */
18 18
   public static function create(string $message = "", int $code = 0, ?Exception $previous = null, array $details = [])
19 19
   {
20
-    return new self(self::getBefore() . ": " .$message, $code, $previous, $details);
20
+    return new self(self::getBefore() . ": " . $message, $code, $previous, $details);
21 21
   }
22 22
 
23 23
 
Please login to merge, or discard this patch.
src/Exceptions/ConnectionException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
   */
16 16
   public static function create(string $message = "", int $code = 0, ?Exception $previous = null, array $details = [])
17 17
   {
18
-    return new self(self::getBefore() . ": " .$message, $code, $previous, $details);
18
+    return new self(self::getBefore() . ": " . $message, $code, $previous, $details);
19 19
   }
20 20
 
21 21
   /**
Please login to merge, or discard this patch.
Examples/example08.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 $Cacheer->putCache($cacheKey, $userProfile, ttl: 300);
20 20
 
21 21
 // Recuperando dados do cache
22
-if($Cacheer->isSuccess()){
22
+if ($Cacheer->isSuccess()) {
23 23
     echo "Cache Found: ";
24 24
     print_r($Cacheer->getCache($cacheKey));
25 25
 } else {
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 // Renovando os dados do cache
30 30
 $Cacheer->renewCache($cacheKey, 3600);
31 31
 
32
-if($Cacheer->isSuccess()){
32
+if ($Cacheer->isSuccess()) {
33 33
   echo $Cacheer->getMessage() . PHP_EOL;
34 34
 } else {
35 35
   echo $Cacheer->getMessage() . PHP_EOL;
Please login to merge, or discard this patch.
Examples/example07.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 $Cacheer->putCache($cacheKey, $userProfile);
26 26
 
27 27
 // Recuperando dados do cache
28
-if($Cacheer->isSuccess()){
28
+if ($Cacheer->isSuccess()) {
29 29
     echo "Cache Found: ";
30 30
     print_r($Cacheer->getCache($cacheKey));
31 31
 } else {
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 // Mesclando os dados
37 37
 $Cacheer->appendCache($cacheKey, $userProfile02);
38 38
 
39
-if($Cacheer->isSuccess()){
39
+if ($Cacheer->isSuccess()) {
40 40
     echo $Cacheer->getMessage() . PHP_EOL;
41 41
     print_r($Cacheer->getCache($cacheKey));
42 42
 } else {
Please login to merge, or discard this patch.
src/Exceptions/CacheDatabaseException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
   */
18 18
   public static function create(string $message = "", int $code = 0, ?Exception $previous = null, array $details = [])
19 19
   {
20
-    return new self(self::getBefore() . ": " .$message, $code, $previous, $details);
20
+    return new self(self::getBefore() . ": " . $message, $code, $previous, $details);
21 21
   }
22 22
 
23 23
 
Please login to merge, or discard this patch.