Code Duplication    Length = 11-13 lines in 2 locations

src/Schema/Blueprint.php 2 locations

@@ 109-119 (lines=11) @@
106
     *
107
     * @return mixed
108
     */
109
    public function primaryIndex($name = null, $ignoreIfExist = false, $defer = false)
110
    {
111
        $name = (is_null($name)) ? "" : $name;
112
113
        return $this->connection->openBucket($this->getTable())
114
            ->manager()->createN1qlPrimaryIndex(
115
                $name,
116
                $ignoreIfExist,
117
                $defer
118
            );
119
    }
120
121
    /**
122
     * Specify a secondary index for the current bucket.
@@ 134-146 (lines=13) @@
131
     *
132
     * @return mixed
133
     */
134
    public function index($columns, $name = null, $whereClause = '', $ignoreIfExist = false, $defer = false)
135
    {
136
        $name = (is_null($name)) ? $this->getTable() . "_secondary_index" : $name;
137
138
        return $this->connection->openBucket($this->getTable())
139
            ->manager()->createN1qlIndex(
140
                $name,
141
                $columns,
142
                $whereClause,
143
                $ignoreIfExist,
144
                $defer
145
            );
146
    }
147
148
    /**
149
     * Get the table the blueprint describes.