| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 9 | 
| Code Lines | 5 | 
| Lines | 9 | 
| Ratio | 100 % | 
| 1 | <?php | ||
| 42 | View Code Duplication |     function __construct($db = null) { | |
| 43 |         $testState = Injector::inst()->get('TestSessionEnvironment')->getState(); | ||
| 44 | |||
| 45 |         if(!$db) { | ||
| 46 | $db = new FakeDatabase($testState->fakeDatabasePath); | ||
| 47 | } | ||
| 48 | |||
| 49 | $this->db = $db; | ||
| 50 | } | ||
| 51 | |||
| 58 | } | 
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.