Code Duplication    Length = 5-7 lines in 2 locations

src/driver.php 2 locations

@@ 236-240 (lines=5) @@
233
                'type' => dtype::STRING,
234
            );
235
236
            if (substr($property->dbtype, -1) == ')') {
237
                $mapping['length'] = (int) substr($property->dbtype, 8, -1);
238
                return $mapping;
239
            }
240
241
            if (substr($property->dbtype, -8) == ') binary') {
242
                // see http://www.doctrine-project.org/jira/browse/DDC-1817
243
                $mapping['length'] = (int) substr($property->dbtype, 8, -1);
@@ 241-247 (lines=7) @@
238
                return $mapping;
239
            }
240
241
            if (substr($property->dbtype, -8) == ') binary') {
242
                // see http://www.doctrine-project.org/jira/browse/DDC-1817
243
                $mapping['length'] = (int) substr($property->dbtype, 8, -1);
244
                $mapping['comment'] = 'BINARY';
245
                return $mapping;
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];