Conditions | 3 |
Paths | 4 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
24 | 54 | public function boot() |
|
25 | { |
||
26 | // Require helper files |
||
27 | 54 | if(!function_exists('htmLawed')) { |
|
28 | 1 | require_once dirname(__FILE__) . "/Manager/utils/vendors/htmlLawed.php"; |
|
29 | } |
||
30 | |||
31 | 54 | require_once dirname(__FILE__) . "/Manager/utils/helpers.php"; |
|
32 | |||
33 | 54 | if (! $this->app->routesAreCached()) { |
|
|
|||
34 | 54 | 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 | 54 | $this->loadViewsFrom(realpath(__DIR__ . '/Manager/Http/views'), 'squanto'); |
|
40 | 54 | } |
|
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: