Code Duplication    Length = 12-12 lines in 2 locations

src/Capsule/Collection.php 2 locations

@@ 64-75 (lines=12) @@
61
    /**
62
     * {@inheritdoc}
63
     */
64
    public function findOneAndUpdate($filter, $update, array $options = [])
65
    {
66
        $data = [
67
            "filter" => $filter,
68
            "update" => $update,
69
        ];
70
        $event = $this->startQueryLogging($data, __FUNCTION__);
71
        $result = parent::findOneAndUpdate($filter, $update, $options);
72
        $this->logger->logQuery($event);
73
74
        return $result;
75
    }
76
77
    /**
78
     * {@inheritdoc}
@@ 116-127 (lines=12) @@
113
    /**
114
     * {@inheritdoc}
115
     */
116
    public function replaceOne($filter, $replacement, array $options = [])
117
    {
118
        $data = [
119
            "filter" => $filter,
120
            "replacement" => $replacement,
121
        ];
122
        $event = $this->startQueryLogging($data, __FUNCTION__);
123
        $result = parent::replaceOne($filter, $replacement, $options);
124
        $this->logger->logQuery($event);
125
126
        return $result;
127
    }
128
129
    /**
130
     * {@inheritdoc}