Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
28 | 1 | public static function configure_server($config): void |
|
29 | { |
||
30 | $configArray = [ |
||
31 | 'endpoint' => [ |
||
32 | 'localhost' => [ |
||
33 | 1 | 'host' => $config['host'] ?? '127.0.0.1', |
|
34 | 1 | 'port' => $config['port'] ?? 8983, |
|
35 | ], |
||
36 | ], |
||
37 | ]; |
||
38 | 1 | SolrCoreService::config()->set('config', $configArray); |
|
39 | $modeArray = [ |
||
40 | 1 | 'mode' => $config['indexstore']['mode'] ?? 'file', |
|
41 | 1 | 'path' => $config['indexstore']['path'] ?? '.solr', |
|
42 | ]; |
||
43 | 1 | SolrCoreService::config()->set('mode', $modeArray); |
|
44 | 1 | SolrCoreService::config()->set('cpucores', $config['cores'] ?? 1); |
|
45 | 1 | } |
|
47 |