Code Duplication    Length = 5-5 lines in 2 locations

src/Comodojo/Cache/Drivers/FilesystemGhost.php 1 location

@@ 33-37 (lines=5) @@
30
        $cacheFile = $this->cache_folder."$key-$namespace.cache";
31
        $cacheGhost = $this->cache_folder."$key-$namespace.expire";
32
33
        if ( $ttl == null || $ttl == 0 ) {
34
            $ttl = 0;
35
        } else {
36
            $ttl = time() + intval($ttl);
37
        }
38
39
        $cached = @file_put_contents($cacheFile, $value, LOCK_EX);
40

src/Comodojo/Cache/Drivers/FilesystemXattr.php 1 location

@@ 80-84 (lines=5) @@
77
78
        $cacheFile = $this->cache_folder."$key-$namespace.cache";
79
80
        if ( $ttl == null || $ttl == 0 ) {
81
            $ttl = 0;
82
        } else {
83
            $ttl = time() + intval($ttl);
84
        }
85
86
        $cached = @file_put_contents($cacheFile, $value, LOCK_EX);
87