Code Duplication    Length = 3-3 lines in 3 locations

src/Query/Dialects/Firebird/CreateTable.php 1 location

@@ 138-140 (lines=3) @@
135
				case $type === 'TIMESTAMP' && intval($defaultValue) === 0:
136
					$field[] = 'DEFAULT 0';
137
					break;
138
				case strtoupper($defaultValue) === 'NULL' && $isNull === true:
139
					$field[] = 'DEFAULT NULL';
140
					break;
141
				default:
142
					$field[] = 'DEFAULT \''.$defaultValue.'\'';
143
			}

src/Query/Dialects/Postgres/CreateTable.php 1 location

@@ 138-140 (lines=3) @@
135
				case $type === 'BOOLEAN':
136
					$field[] = 'DEFAULT '.preg_match('/^1|T|TRUE|YES$/i', $defaultValue) ? 'TRUE' : 'FALSE';
137
					break;
138
				case strtoupper($defaultValue) === 'NULL' && $isNull === true:
139
					$field[] = 'DEFAULT NULL';
140
					break;
141
				default:
142
					$field[] = 'DEFAULT \''.$defaultValue.'\'';
143
			}

src/Query/Dialects/MySQL/CreateTable.php 1 location

@@ 136-138 (lines=3) @@
133
				case $type === 'BINARY' || $type === 'VARBINARY':
134
					$field[] = 'DEFAULT 0x'.$defaultValue;
135
					break;
136
				case strtoupper($defaultValue) === 'NULL' && $isNull === true:
137
					$field[] = 'DEFAULT NULL';
138
					break;
139
				default:
140
					$field[] = 'DEFAULT '.(is_int($defaultValue) || is_float($defaultValue) ? $defaultValue : '\''.$defaultValue.'\'') ;
141
			}