Code Duplication    Length = 8-9 lines in 3 locations

src/Adapter/InMemoryAdapter.php 1 location

@@ 129-136 (lines=8) @@
126
     *
127
     * @return int
128
     */
129
    private function getCalculatedTtl($ttl)
130
    {
131
        $calculatedTtl = \strtotime(\sprintf('now +%s seconds', $ttl));
132
        if (0 == $ttl) {
133
            $calculatedTtl = \strtotime('now +10 years');
134
        }
135
        return $calculatedTtl;
136
    }
137
138
    /**
139
     * @param $value

src/Adapter/FileSystemAdapter.php 1 location

@@ 166-174 (lines=9) @@
163
     *
164
     * @return int
165
     */
166
    private function getCalculatedTtl($ttl)
167
    {
168
        $calculatedTtl = \strtotime(\sprintf('now +%s seconds', $ttl));
169
170
        if (0 == $ttl) {
171
            $calculatedTtl = \strtotime('now +10 years');
172
        }
173
        return $calculatedTtl;
174
    }
175
176
    /**
177
     * @param $value

src/Adapter/SQL/AbstractAdapter.php 1 location

@@ 234-241 (lines=8) @@
231
     *
232
     * @return int
233
     */
234
    protected function getCalculatedTtl($ttl)
235
    {
236
        $calculatedTtl = \strtotime(\sprintf('now +%s seconds', $ttl));
237
        if (0 == $ttl) {
238
            $calculatedTtl = \strtotime('now +10 years');
239
        }
240
        return $calculatedTtl;
241
    }
242
243
    /**
244
     * @param     $key