Code Duplication    Length = 4-4 lines in 2 locations

src/Core.php 2 locations

@@ 177-180 (lines=4) @@
174
            $table_name = $this->wpdb->prefix . 'timeshift_' . $post_type;
175
            $sql = "select * from $table_name where id=" . intval($_GET['timeshift']);
176
            $r = $this->wpdb->get_results($sql);
177
            if ($r && count($r) == 1) {
178
                $payload = unserialize($r[0]->post_payload);
179
                $this->timeshift_cached_meta = $payload->meta;
180
            }
181
        }
182
        //is the requested meta data in the stored snapshot
183
        if ($this->timeshift_cached_meta && isset($this->timeshift_cached_meta[$key])) {
@@ 201-204 (lines=4) @@
198
        $table_name = $this->wpdb->prefix . 'timeshift_' . $post->post_type;
199
        $sql = "select * from $table_name where id=" . intval($_GET['timeshift']);
200
        $r = $this->wpdb->get_results($sql);
201
        if ($r && count($r) == 1) {
202
            $payload = unserialize($r[0]->post_payload);
203
            $post = $payload->post;
204
        }
205
    }
206
207
    public function add_actions()