<?php

/*
 * This file is part of Laravel Database.
 *
 * (c) Brian Faust <hello@brianfaust.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

declare(strict_types=1);

/*
 * This file is part of Laravel Database.
 *
 * (c) Brian Faust <hello@brianfaust.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace BrianFaust\Database\Migrations;

use BrianFaust\Database\Schema\Blueprint;

abstract class Migration
{
    protected $connection;

    protected $schema;

    public function __construct()
    {
        $this->schema = \DB::getSchemaBuilder();

        $this->schema->blueprintResolver(function ($table, $callback) {
            return new Blueprint($table, $callback);
        });
    }

    public function getConnection()
    {
        return $this->connection;
    }
}

<?php

/*
 * This file is part of Laravel Database.
 *
 * (c) Brian Faust <hello@brianfaust.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

declare(strict_types=1);

/*
 * This file is part of Laravel Database.
 *
 * (c) Brian Faust <hello@brianfaust.de>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace BrianFaust\Database\Migrations;

use BrianFaust\Database\Schema\Blueprint;

abstract class Migration
{
    protected $connection;

    protected $schema;

    public function __construct(): void
    {
        $this->schema = \DB::getSchemaBuilder();

        $this->schema->blueprintResolver(function ($table, $callback) {
            return new Blueprint($table, $callback);
        });
    }

    public function getConnection()
    {
        return $this->connection;
    }
}

--- 
+++ 
@@ -30,7 +30,7 @@
 
     protected $schema;
 
-    public function __construct(): void
+    public function __construct()
     {
         $this->schema = \DB::getSchemaBuilder();
 
:ambulance: Fix '__construct() cannot declare a return type'
