Conditions | 4 |
Paths | 4 |
Total Lines | 19 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function isDevEnv() |
||
31 | { |
||
32 | // if set to dev stop here |
||
33 | if ($this->blnIsDev) { |
||
34 | return true; |
||
35 | } |
||
36 | |||
37 | // domain extension is .dev |
||
38 | if ($this->isDevDomain()) { |
||
39 | return true; |
||
40 | } |
||
41 | |||
42 | // localhost |
||
43 | if ($this->isLocalhost()) { |
||
44 | return true; |
||
45 | } |
||
46 | |||
47 | return false; |
||
48 | } |
||
49 | |||
75 | } |
Instead of super-globals, we recommend to explicitly inject the dependencies of your class. This makes your code less dependent on global state and it becomes generally more testable: