1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of Laravel Love. |
||
5 | * |
||
6 | * (c) Anton Komarev <[email protected]> |
||
7 | * |
||
8 | * For the full copyright and license information, please view the LICENSE |
||
9 | * file that was distributed with this source code. |
||
10 | */ |
||
11 | |||
12 | declare(strict_types=1); |
||
13 | |||
14 | namespace Cog\Laravel\Love\Support\Database; |
||
15 | |||
16 | use Illuminate\Database\Migrations\Migration as IlluminateMigration; |
||
17 | use Illuminate\Support\Facades\Config; |
||
18 | use Illuminate\Support\Facades\Schema; |
||
19 | |||
20 | abstract class Migration extends IlluminateMigration |
||
21 | { |
||
22 | /** |
||
23 | * The database schema. |
||
24 | * |
||
25 | * @var \Illuminate\Support\Facades\Schema |
||
26 | */ |
||
27 | protected $schema; |
||
28 | |||
29 | public function __construct() |
||
30 | { |
||
31 | $this->schema = Schema::connection($this->getConnection()); |
||
0 ignored issues
–
show
|
|||
32 | } |
||
33 | |||
34 | /** |
||
35 | * Get the migration connection name. |
||
36 | * |
||
37 | * @return null|string |
||
38 | */ |
||
39 | public function getConnection(): ?string |
||
40 | { |
||
41 | return Config::get('love.storage.database.connection'); |
||
42 | } |
||
43 | } |
||
44 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..