Code Duplication    Length = 7-9 lines in 2 locations

src/Migrations/MigrationTrait.php 2 locations

@@ 245-253 (lines=9) @@
242
     *
243
     * @return Closure
244
     */
245
    protected function bool(string $name, $default = null): Closure
246
    {
247
        return function (Table $table) use ($name, $default) {
248
            $column = $table->addColumn($name, Type::BOOLEAN)->setNotnull(true);
249
            if ($default !== null && is_bool($default) === true) {
250
                $column->setDefault($default);
251
            }
252
        };
253
    }
254
255
    /**
256
     * @param string $name
@@ 535-541 (lines=7) @@
532
     *
533
     * @return Closure
534
     */
535
    private function unsignedIntImpl($name, $notNullable, $default = null): Closure
536
    {
537
        return function (Table $table) use ($name, $notNullable, $default) {
538
            $column = $table->addColumn($name, Type::INTEGER)->setUnsigned(true)->setNotnull($notNullable);
539
            $default === null ?: $column->setDefault($default);
540
        };
541
    }
542
543
    /**
544
     * @param string $name