Code Duplication    Length = 19-19 lines in 2 locations

src/Searcher/PdoSearcher.php 2 locations

@@ 23-41 (lines=19) @@
20
    /**
21
     * {@inheritdoc}
22
     */
23
    public function latest(): Profile
24
    {
25
        $row = $this->db->getLatest();
26
27
        return new Profile([
28
            '_id' => $row['id'],
29
            'meta' => [
30
                'url' => $row['url'],
31
                'SERVER' => json_decode($row['SERVER'], true),
32
                'get' => json_decode($row['GET'], true),
33
                'env' => json_decode($row['ENV'], true),
34
                'simple_url' => $row['simple_url'],
35
                'request_ts' => (int) $row['request_ts'],
36
                'request_ts_micro' => $row['request_ts_micro'],
37
                'request_date' => $row['request_date'],
38
            ],
39
            'profile' => json_decode($row['profile'], true),
40
        ]);
41
    }
42
43
    public function query($conditions, $limit, $fields = []): void
44
    {
@@ 51-69 (lines=19) @@
48
    /**
49
     * {@inheritdoc}
50
     */
51
    public function get($id): Profile
52
    {
53
        $row = $this->db->getById($id);
54
55
        return new Profile([
56
            '_id' => $id,
57
            'meta' => [
58
                'url' => $row['url'],
59
                'SERVER' => json_decode($row['SERVER'], true),
60
                'get' => json_decode($row['GET'], true),
61
                'env' => json_decode($row['ENV'], true),
62
                'simple_url' => $row['simple_url'],
63
                'request_ts' => (int) $row['request_ts'],
64
                'request_ts_micro' => $row['request_ts_micro'],
65
                'request_date' => $row['request_date'],
66
            ],
67
            'profile' => json_decode($row['profile'], true),
68
        ]);
69
    }
70
71
    public function getForUrl($url, $options, $conditions = []): void
72
    {