| Conditions | 2 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Modules\Recipe\Providers; |
||
| 34 | private function registerBindings() |
||
| 35 | { |
||
| 36 | $this->app->bind( |
||
| 37 | 'Modules\Recipe\Repositories\RecipeRepository', |
||
| 38 | function () { |
||
| 39 | $repository = new \Modules\Recipe\Repositories\Eloquent\EloquentRecipeRepository(new \Modules\Recipe\Entities\Recipe()); |
||
| 40 | |||
| 41 | if (! config('app.cache')) { |
||
| 42 | return $repository; |
||
| 43 | } |
||
| 44 | |||
| 45 | return new \Modules\Recipe\Repositories\Cache\CacheRecipeDecorator($repository); |
||
| 46 | } |
||
| 47 | ); |
||
| 48 | // add bindings |
||
| 49 | |||
| 50 | } |
||
| 51 | } |
||
| 52 |