Code Duplication    Length = 4-4 lines in 2 locations

src/Core.php 2 locations

@@ 120-123 (lines=4) @@
117
            $table_name = $this->wpdb->prefix . 'timeshift_' . $post_type;
118
            $sql = "select * from $table_name where id=" . intval($_GET['timeshift']);
119
            $r = $this->wpdb->get_results($sql);
120
            if ($r && 1 == count($r)) {
121
                $payload = unserialize($r[0]->post_payload);
122
                $this->timeshift_cached_meta = $payload->meta;
123
            }
124
        }
125
        // is the requested meta data in the stored snapshot
126
        if ($this->timeshift_cached_meta && isset($this->timeshift_cached_meta[$key])) {
@@ 143-146 (lines=4) @@
140
        $table_name = $this->wpdb->prefix . 'timeshift_' . $post->post_type;
141
        $sql = "select * from $table_name where id=" . intval($_GET['timeshift']);
142
        $r = $this->wpdb->get_results($sql);
143
        if ($r && 1 == count($r)) {
144
            $payload = unserialize($r[0]->post_payload);
145
            $post = $payload->post;
146
        }
147
    }
148
149
    public function add_actions() {