Code Duplication    Length = 12-12 lines in 2 locations

src/Capsule/Database.php 2 locations

@@ 37-48 (lines=12) @@
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function selectCollection($collectionName, array $options = [])
38
    {
39
        $debug = $this->__debugInfo();
40
        $options += [
41
            'readConcern' => $debug['readConcern'],
42
            'readPreference' => $debug['readPreference'],
43
            'typeMap' => $debug['typeMap'],
44
            'writeConcern' => $debug['writeConcern'],
45
        ];
46
47
        return new Collection($debug['manager'], $debug['databaseName'], $collectionName, $options, $this->eventDispatcher);
48
    }
49
50
    /**
51
     * {@inheritdoc}
@@ 53-64 (lines=12) @@
50
    /**
51
     * {@inheritdoc}
52
     */
53
    public function withOptions(array $options = [])
54
    {
55
        $debug = $this->__debugInfo();
56
        $options += [
57
            'readConcern' => $debug['readConcern'],
58
            'readPreference' => $debug['readPreference'],
59
            'typeMap' => $debug['typeMap'],
60
            'writeConcern' => $debug['writeConcern'],
61
        ];
62
63
        return new self($debug['manager'], $debug['databaseName'], $options, $this->eventDispatcher);
64
    }
65
}
66