| Conditions | 2 |
| Paths | 1 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.0116 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 190 | public function setupStubPath() |
|
| 33 | { |
||
| 34 | 190 | Stub::setBasePath(__DIR__ . '/Commands/stubs'); |
|
| 35 | |||
| 36 | $this->app->booted(function ($app) { |
||
| 37 | /** @var RepositoryInterface $moduleRepository */ |
||
| 38 | 190 | $moduleRepository = $app[RepositoryInterface::class]; |
|
| 39 | 190 | if ($moduleRepository->config('stubs.enabled') === true) { |
|
| 40 | Stub::setBasePath($moduleRepository->config('stubs.path')); |
||
|
|
|||
| 41 | } |
||
| 42 | 190 | }); |
|
| 43 | 190 | } |
|
| 44 | |||
| 58 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: