Code Duplication    Length = 6-8 lines in 2 locations

src/driver.php 2 locations

@@ 182-189 (lines=8) @@
179
                continue;
180
            }
181
182
            if (empty($this->dbtypemap[$property->dbtype])) {
183
                $mapping = $this->parse_dbtype($property);
184
            } else {
185
                $mapping = $this->dbtypemap[$property->dbtype];
186
            }
187
188
            if ($property->unique) {
189
                if ($property->name == 'guid') {
190
                    $mapping['unique'] = true;
191
                } else {
192
                    //we can't set this as a real DB constraint because of softdelete and tree hierarchies
@@ 249-254 (lines=6) @@
246
            }
247
        } elseif (strpos($property->dbtype, 'set') === 0) {
248
            // see http://docs.doctrine-project.org/en/latest/cookbook/mysql-enums.html
249
            if (!empty($this->dbtypemap[$property->type])) {
250
                $mapping = $this->dbtypemap[$property->type];
251
                $mapping['comment'] = $property->dbtype;
252
                return $mapping;
253
            }
254
        }
255
256
        throw new \Exception($property->get_parent()->name . ': ' . $property->name . ' ' . $property->dbtype . ' not implemented yet');
257
    }