| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function run() |
||
| 26 | { |
||
| 27 | return view('microboard::state', [ |
||
| 28 | 'config' => $this->config, |
||
| 29 | 'title' => trans('microboard::pages.widgets.users-in-this-month.title'), |
||
| 30 | 'info' => trans('microboard::pages.widgets.users-in-this-month.info'), |
||
| 31 | 'icon' => 'fa fa-user', |
||
| 32 | 'count' => User::count(), |
||
| 33 | 'extra' => User::whereBetween('created_at', [ |
||
| 34 | now()->firstOfMonth(), |
||
| 35 | now()->lastOfMonth() |
||
| 36 | ])->count() |
||
| 37 | ]); |
||
| 38 | } |
||
| 39 | |||
| 50 |
It seems like the method you are trying to call exists only in some of the possible types.
Let’s take a look at an example:
Available Fixes
Add an additional type-check:
Only allow a single type to be passed if the variable comes from a parameter: