| Conditions | 2 |
| Paths | 1 |
| Total Lines | 38 |
| Code Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 31 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 47 | 343 | public function register() |
|
| 48 | { |
||
| 49 | 343 | $this->mergeConfigFrom( |
|
| 50 | 343 | __DIR__ . '/../config/arangodb.php', |
|
| 51 | 343 | 'arangodb' |
|
| 52 | 343 | ); |
|
| 53 | |||
| 54 | 343 | $this->app->singleton(\Illuminate\Database\Migrations\Migrator::class, function ($app) { |
|
| 55 | 343 | return $app['migrator']; |
|
| 56 | 343 | }); |
|
| 57 | |||
| 58 | 343 | $this->app->resolving( |
|
| 59 | 343 | 'db', |
|
| 60 | 343 | function ($db) { |
|
| 61 | 343 | $db->extend( |
|
| 62 | 343 | 'arangodb', |
|
| 63 | 343 | function ($config, $name) { |
|
| 64 | 343 | $config['name'] = $name; |
|
| 65 | 343 | $connection = new Connection($config); |
|
| 66 | 343 | $connection->setSchemaGrammar(new SchemaGrammar()); |
|
| 67 | |||
| 68 | 343 | return $connection; |
|
| 69 | 343 | } |
|
| 70 | 343 | ); |
|
| 71 | 343 | } |
|
| 72 | 343 | ); |
|
| 73 | |||
| 74 | 343 | $this->app->resolving( |
|
| 75 | 343 | function () { |
|
| 76 | 343 | if (class_exists('Illuminate\Foundation\AliasLoader')) { |
|
| 77 | 343 | $loader = \Illuminate\Foundation\AliasLoader::getInstance(); |
|
| 78 | 343 | $loader->alias('Eloquent', 'LaravelFreelancerNL\Aranguent\Eloquent\Model'); |
|
| 79 | } |
||
| 80 | 343 | } |
|
| 81 | 343 | ); |
|
| 82 | |||
| 83 | 343 | $this->app->register('LaravelFreelancerNL\Aranguent\Providers\MigrationServiceProvider'); |
|
| 84 | 343 | $this->app->register('LaravelFreelancerNL\Aranguent\Providers\CommandServiceProvider'); |
|
| 85 | } |
||
| 87 |