Code Duplication    Length = 8-8 lines in 4 locations

src/Capsule/Collection.php 4 locations

@@ 52-59 (lines=8) @@
49
    /**
50
     * {@inheritdoc}
51
     */
52
    public function findOne($filter = [], array $options = [])
53
    {
54
        $event = $this->startQueryLogging($filter, __FUNCTION__);
55
        $result = parent::findOne($filter, $options);
56
        $this->logger->logQuery($event);
57
58
        return $result;
59
    }
60
61
    /**
62
     * {@inheritdoc}
@@ 64-71 (lines=8) @@
61
    /**
62
     * {@inheritdoc}
63
     */
64
    public function findOneAndUpdate($filter, $update, array $options = [])
65
    {
66
        $event = $this->startQueryLogging($filter, __FUNCTION__);
67
        $result = parent::findOneAndUpdate($filter, $update, $options);
68
        $this->logger->logQuery($event);
69
70
        return $result;
71
    }
72
73
    /**
74
     * {@inheritdoc}
@@ 76-83 (lines=8) @@
73
    /**
74
     * {@inheritdoc}
75
     */
76
    public function findOneAndDelete($filter, array $options = [])
77
    {
78
        $event = $this->startQueryLogging($filter, __FUNCTION__);
79
        $result = parent::findOneAndDelete($filter, $options);
80
        $this->logger->logQuery($event);
81
82
        return $result;
83
    }
84
85
    /**
86
     * {@inheritdoc}
@@ 88-95 (lines=8) @@
85
    /**
86
     * {@inheritdoc}
87
     */
88
    public function insertOne($document, array $options = [])
89
    {
90
        $event = $this->startQueryLogging($document, __FUNCTION__);
91
        $result = parent::insertOne($document, $options);
92
        $this->logger->logQuery($event);
93
94
        return $result;
95
    }
96
97
    /**
98
     * @param        $filter