Code Duplication    Length = 12-12 lines in 2 locations

src/Model/Database.php 2 locations

@@ 59-70 (lines=12) @@
56
     *
57
     * @return bool|\PDOStatement
58
     */
59
    public function query($query)
60
    {
61
        try {
62
            return parent::query($query);
63
        } catch (PDOException $e) {
64
            if ('HY000' !== $e->getCode()) {
65
                throw $e;
66
            }
67
            $this->reconnect();
68
69
            return parent::query($query);
70
        }
71
    }
72
73
    /**
@@ 78-89 (lines=12) @@
75
     *
76
     * @return bool|int
77
     */
78
    public function exec($query)
79
    {
80
        try {
81
            return parent::exec($query);
82
        } catch (PDOException $e) {
83
            if ('HY000' !== $e->getCode()) {
84
                throw $e;
85
            }
86
            $this->reconnect();
87
88
            return parent::exec($query);
89
        }
90
    }
91
}
92