Skip to content

Commit 9e8905c

Browse files
committed
Refactor
1 parent f7ed24b commit 9e8905c

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/lib/ColumnToCode.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,8 @@ public function getCode(bool $quoted = false):string
165165
array_unshift($parts, '$this');
166166
return implode('->', array_filter(array_map('trim', $parts)));
167167
}
168-
if ($this->rawParts['default'] === null) {
169-
$default = '';
170-
} else {
171-
$default = $this->rawParts['default'] !== null ? ' DEFAULT ' . trim($this->rawParts['default']) : '';
172-
}
173168

169+
$default = $this->rawParts['default'] !== null ? ' DEFAULT ' . trim($this->rawParts['default']) : '';
174170
$code = $this->rawParts['type'] . ' ' . $this->rawParts['nullable'] . $default;
175171
if ((ApiGenerator::isMysql() || ApiGenerator::isMariaDb()) && $this->rawParts['position']) {
176172
$code .= ' ' . $this->rawParts['position'];

0 commit comments

Comments
 (0)