Code Duplication    Length = 4-4 lines in 2 locations

src/Core.php 2 locations

@@ 135-138 (lines=4) @@
132
            $table_name = $this->wpdb->prefix . 'timeshift_' . $post_type;
133
            $sql = "select * from $table_name where id=" . intval($_GET['timeshift']);
134
            $r = $this->wpdb->get_results($sql);
135
            if ($r && count($r) == 1) {
136
                $payload = unserialize($r[0]->post_payload);
137
                $this->timeshift_cached_meta = $payload->meta;
138
            }
139
        }
140
        if ($this->timeshift_cached_meta && isset($this->timeshift_cached_meta[$key])) {
141
            return $this->timeshift_cached_meta[$key];
@@ 160-163 (lines=4) @@
157
        $table_name = $this->wpdb->prefix . 'timeshift_' . $post->post_type;
158
        $sql = "select * from $table_name where id=" . intval($_GET['timeshift']);
159
        $r = $this->wpdb->get_results($sql);
160
        if ($r && count($r) == 1) {
161
            $payload = unserialize($r[0]->post_payload);
162
            $post = $payload->post;
163
        }
164
    }
165
166
    public function add_actions()