Conditions | 1 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | protected function makeComparativeUrl($currentUrl) |
||
10 | { |
||
11 | $mock = $this->createMock(UrlGenerator::class); |
||
12 | $mock->method('current')->willReturn(url($currentUrl)); |
||
13 | $mock->method('to')->willReturnCallback('url'); |
||
14 | |||
15 | return new ComparativeUrl($mock, config('menu.skippedPaths')); |
||
16 | } |
||
17 | |||
50 | } |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.