| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | public function run() |
||
| 27 | { |
||
| 28 | return view('microboard::state', [ |
||
| 29 | 'config' => $this->config, |
||
| 30 | 'title' => trans('microboard::pages.widgets.permissions-count.title'), |
||
| 31 | 'info' => trans('microboard::pages.widgets.permissions-count.info'), |
||
| 32 | 'icon' => 'ni ni-key-25', |
||
| 33 | 'count' => Permission::count() |
||
| 34 | ]); |
||
| 35 | } |
||
| 36 | |||
| 47 |
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: