Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
19 | 2 | public function nestedInnerHit(string $name, string $path, ?\Closure $search = null) : InnerHit |
|
20 | { |
||
21 | 2 | $searchForNested = null; |
|
22 | |||
23 | 2 | if ($search) { |
|
24 | 2 | $searchBuilder = app()->make(Search::class); |
|
25 | 2 | $search($searchBuilder); |
|
26 | |||
27 | 2 | $searchForNested = $searchBuilder->getSearch(); |
|
28 | } |
||
29 | |||
30 | 2 | $this->search->addInnerHit(new NestedInnerHit($name, $path, $searchForNested)); |
|
31 | 2 | return $this; |
|
32 | } |
||
57 |