| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 44 | function lang_redirect($to = null, $status = 302, $headers = [], $secure = null) |
||
|
|
|||
| 45 | { |
||
| 46 | if (is_null($to)) { |
||
| 47 | return app('redirect'); |
||
| 48 | } |
||
| 49 | |||
| 50 | $multilang = app('multilang'); |
||
| 51 | |||
| 52 | $to = $multilang->getUrl($to); |
||
| 53 | |||
| 54 | return app('redirect')->to($to, $status, $headers, $secure); |
||
| 55 | } |
||
| 56 | } |
||
| 72 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.