| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 62 | public function boot() |
|
| 25 | { |
||
| 26 | 62 | require_once dirname(__FILE__) . "/Manager/utils/helpers.php"; |
|
| 27 | |||
| 28 | 62 | if (! $this->app->routesAreCached()) { |
|
|
|
|||
| 29 | 62 | require __DIR__ . '/Manager/Http/routes/web.php'; |
|
| 30 | } |
||
| 31 | |||
| 32 | // Register squanto viewfiles under squanto:: namespace |
||
| 33 | // allow to override them by making a view file under the resources/views/vendor/squanto location |
||
| 34 | 62 | $this->loadViewsFrom(realpath(__DIR__ . '/Manager/Http/views'), 'squanto'); |
|
| 35 | 62 | } |
|
| 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: