| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.0116 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 15 | public function register() |
|
| 21 | { |
||
| 22 | 15 | $this->mergeConfigFrom(__DIR__.'/../config/laravel-velo-api.php', 'laravel-velo-api'); |
|
| 23 | |||
| 24 | 15 | $this->app->bind(VeloStations::class); |
|
| 25 | |||
| 26 | 15 | if (app()->environment('testing')) { |
|
|
|
|||
| 27 | $this->app->bind('velo-stations', function () { |
||
| 28 | 7 | return new VeloStations(new VeloClientMock()); |
|
| 29 | 15 | }); |
|
| 30 | } else { |
||
| 31 | $this->app->bind('velo-stations', function () { |
||
| 32 | return new VeloStations(new VeloClient()); |
||
| 33 | }); |
||
| 37 |