Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 4.8437 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | 1 | public function detect($collection) |
|
28 | 1 | { |
|
29 | $current = $this->detectFromConstant(); |
||
30 | if ($current) { |
||
31 | 1 | return $current; |
|
32 | 1 | } |
|
33 | 1 | $current = $this->detectFromConfig(); |
|
34 | if ($current) { |
||
35 | return $current; |
||
36 | } |
||
37 | $current = $this->detectFromSubdomain($collection); |
||
38 | if ($current) { |
||
39 | return $current; |
||
40 | } |
||
41 | |||
42 | return 'main'; |
||
43 | } |
||
85 |