Code Coverage  | 
      ||||||||||
Lines  | 
       Functions and Methods  | 
       Classes and Traits  | 
      ||||||||
| Total |         | 
       100.00%  | 
       6 / 6  | 
               | 
       100.00%  | 
       1 / 1  | 
       CRAP |         | 
       100.00%  | 
       1 / 1  | 
      
| MigrationServiceProvider |         | 
       100.00%  | 
       6 / 6  | 
               | 
       100.00%  | 
       1 / 1  | 
       1 |         | 
       100.00%  | 
       1 / 1  | 
      
| register |         | 
       100.00%  | 
       6 / 6  | 
               | 
       100.00%  | 
       1 / 1  | 
       1 | |||
| 1 | <?php | 
| 2 | |
| 3 | declare(strict_types=1); | 
| 4 | |
| 5 | namespace Engelsystem\Database\Migration; | 
| 6 | |
| 7 | use Engelsystem\Container\ServiceProvider; | 
| 8 | use Engelsystem\Database\Database; | 
| 9 | use Illuminate\Database\Schema\Builder as SchemaBuilder; | 
| 10 | |
| 11 | class MigrationServiceProvider extends ServiceProvider | 
| 12 | { | 
| 13 | public function register(): void | 
| 14 | { | 
| 15 | /** @var Database $database */ | 
| 16 | $database = $this->app->get(Database::class); | 
| 17 | $schema = $database->getConnection()->getSchemaBuilder(); | 
| 18 | |
| 19 | $this->app->instance('db.schema', $schema); | 
| 20 | $this->app->bind(SchemaBuilder::class, 'db.schema'); | 
| 21 | |
| 22 | $migration = $this->app->make(Migrate::class); | 
| 23 | $this->app->instance('db.migration', $migration); | 
| 24 | } | 
| 25 | } |