Code Duplication    Length = 11-11 lines in 2 locations

src/Client/Cache/MySQL/Manage.php 1 location

@@ 108-118 (lines=11) @@
105
     * @param int $delay
106
     * @return bool
107
     */
108
    public function clean($delay = self::CLEAN_DELAY)
109
    {
110
        $delay += self::CACHE_TIME;
111
        $query = $this->pdo->prepare(<<<SQL
112
DELETE FROM robotstxt__cache1
113
WHERE nextUpdate < (UNIX_TIMESTAMP() - :delay);
114
SQL
115
        );
116
        $query->bindValue('delay', $delay, \PDO::PARAM_INT);
117
        return $query->execute();
118
    }
119
}
120

src/Client/Delay/MySQL/Manage.php 1 location

@@ 26-36 (lines=11) @@
23
     *
24
     * @return bool
25
     */
26
    public function clean()
27
    {
28
        $delay = self::OUT_OF_SYNC_TIME_LIMIT;
29
        $query = $this->pdo->prepare(<<<SQL
30
DELETE FROM robotstxt__delay0
31
WHERE delayUntil < ((UNIX_TIMESTAMP() - :delay) * 1000000);
32
SQL
33
        );
34
        $query->bindValue('delay', $delay, \PDO::PARAM_INT);
35
        return $query->execute();
36
    }
37
38
    /**
39
     * Top X wait time