| Conditions | 5 |
| Paths | 7 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 30 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function __construct() |
||
| 21 | { |
||
| 22 | if (! self::$connection = DB::connection()->getMongoClient()) { |
||
| 23 | $host = config('database.connections.mongodb.host'); |
||
| 24 | $port = config('database.connections.mongodb.port'); |
||
| 25 | $options = config('database.connections.mongodb.options'); |
||
| 26 | $auth_db = config('database.connections.mongodb.options.database') ? config('database.connections.mongodb.options.database') : null; |
||
| 27 | $dsn = config('database.connections.mongodb.dsn'); |
||
| 28 | |||
| 29 | if (! $dsn) { |
||
| 30 | $dsn = 'mongodb://'.$host.':'.$port.($auth_db ? '/'.$auth_db : ''); |
||
| 31 | } |
||
| 32 | |||
| 33 | self::$connection = new Client($dsn); |
||
| 34 | } |
||
| 35 | |||
| 36 | $this->admin = config('database.connections.mongodb.options.database', 'admin'); |
||
| 37 | } |
||
| 53 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths