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