Code Duplication    Length = 12-12 lines in 2 locations

src/Model/Database.php 2 locations

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