| Conditions | 2 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php namespace Modules\Page\Providers; |
||
| 44 | private function registerBindings() |
||
| 45 | { |
||
| 46 | $this->app->bind( |
||
| 47 | 'Modules\Page\Repositories\PageRepository', |
||
| 48 | function () { |
||
| 49 | $repository = new EloquentPageRepository(new Page()); |
||
|
|
|||
| 50 | |||
| 51 | if (! Config::get('app.cache')) { |
||
| 52 | return $repository; |
||
| 53 | } |
||
| 54 | |||
| 55 | return new CachePageDecorator($repository); |
||
| 56 | } |
||
| 57 | ); |
||
| 58 | } |
||
| 59 | } |
||
| 60 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: