Code Duplication    Length = 4-4 lines in 2 locations

src/Core.php 2 locations

@@ 148-151 (lines=4) @@
145
            $table_name = $this->wpdb->prefix . 'timeshift_' . $post_type;
146
            $sql = "select * from $table_name where id=" . intval($_GET['timeshift']);
147
            $r = $this->wpdb->get_results($sql);
148
            if ($r && count($r) == 1) {
149
                $payload = unserialize($r[0]->post_payload);
150
                $this->timeshift_cached_meta = $payload->meta;
151
            }
152
        }
153
        if ($this->timeshift_cached_meta && isset($this->timeshift_cached_meta[$key])) {
154
            return $this->timeshift_cached_meta[$key];
@@ 173-176 (lines=4) @@
170
        $table_name = $this->wpdb->prefix . 'timeshift_' . $post->post_type;
171
        $sql = "select * from $table_name where id=" . intval($_GET['timeshift']);
172
        $r = $this->wpdb->get_results($sql);
173
        if ($r && count($r) == 1) {
174
            $payload = unserialize($r[0]->post_payload);
175
            $post = $payload->post;
176
        }
177
    }
178
179
    public function add_actions()