| Conditions | 3 |
| Paths | 4 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | 55 | public function boot() |
|
| 25 | { |
||
| 26 | // Require helper files |
||
| 27 | 55 | if(!function_exists('htmLawed')) { |
|
| 28 | 1 | require_once dirname(__FILE__) . "/Manager/utils/vendors/htmlLawed.php"; |
|
| 29 | } |
||
| 30 | |||
| 31 | 55 | require_once dirname(__FILE__) . "/Manager/utils/helpers.php"; |
|
| 32 | |||
| 33 | 55 | if (! $this->app->routesAreCached()) { |
|
|
|
|||
| 34 | 55 | require __DIR__ . '/Manager/Http/routes/web.php'; |
|
| 35 | } |
||
| 36 | |||
| 37 | // Register squanto viewfiles under squanto:: namespace |
||
| 38 | // allow to override them by making a view file under the resources/views/vendor/squanto location |
||
| 39 | 55 | $this->loadViewsFrom(realpath(__DIR__ . '/Manager/Http/views'), 'squanto'); |
|
| 40 | 55 | } |
|
| 41 | |||
| 52 |
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: