Conditions | 6 |
Paths | 6 |
Total Lines | 24 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function compose(View $view) |
||
31 | { |
||
32 | switch ($view->getName()){ |
||
33 | case "partials.categories.l_sidebar": |
||
34 | return $view->with('categories', $this->categories->getSidebarCollection()); |
||
35 | break; |
||
|
|||
36 | |||
37 | case "partials.categories.footer": |
||
38 | return $view->with('categories', $this->categories->getFooterCollection()); |
||
39 | break; |
||
40 | |||
41 | case "partials.categories.header_dropdown": |
||
42 | return $view->with('categories', $this->categories->getSidebarCollection()); // the same select like l_sidebar |
||
43 | break; |
||
44 | |||
45 | case "partials.categories.search_dropdown": |
||
46 | return $view->with('categories', $this->categories->getSidebarCollection()); // the same select like l_sidebar |
||
47 | break; |
||
48 | |||
49 | case "product.partials.form.index": |
||
50 | return $view->with('categories', $this->categories->getPublicCategories()); |
||
51 | break; |
||
52 | } |
||
53 | } |
||
54 | } |
The break statement is not necessary if it is preceded for example by a return statement:
If you would like to keep this construct to be consistent with other case statements, you can safely mark this issue as a false-positive.