@@ -11,11 +11,11 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | class OptionBuilder |
| 13 | 13 | { |
| 14 | - /** |
|
| 15 | - * @return FileOptionBuilder |
|
| 16 | - */ |
|
| 17 | - public static function forFile() |
|
| 18 | - { |
|
| 14 | + /** |
|
| 15 | + * @return FileOptionBuilder |
|
| 16 | + */ |
|
| 17 | + public static function forFile() |
|
| 18 | + { |
|
| 19 | 19 | return new FileOptionBuilder(); |
| 20 | - } |
|
| 20 | + } |
|
| 21 | 21 | } |
@@ -65,8 +65,8 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -14,9 +14,9 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | } |