| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 15 | 
| Code Lines | 10 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 9 | 
| CRAP Score | 2 | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 80 | 4 | public function getConnectionUri(): string  | 
            |
| 81 |     { | 
            ||
| 82 | 4 | $credentials = $this->hasCredentials() ?  | 
            |
| 83 | 3 |             sprintf('%s:%s@', $this->username, $this->password) : | 
            |
| 84 | 4 | '';  | 
            |
| 85 | |||
| 86 | 4 | $uri = sprintf(  | 
            |
| 87 | 4 | 'mongodb://%s%s:%d',  | 
            |
| 88 | $credentials,  | 
            ||
| 89 | 4 | $this->host,  | 
            |
| 90 | 4 | $this->port  | 
            |
| 91 | );  | 
            ||
| 92 | |||
| 93 | 4 | return $uri;  | 
            |
| 94 | }  | 
            ||
| 95 | }  | 
            ||
| 96 |