@@ -110,16 +110,16 @@ |
||
| 110 | 110 | ->registerServiceProvider(new RepositoryServiceProvider) |
| 111 | 111 | ->registerServiceProvider(new WebApplicationServiceProvider); |
| 112 | 112 | |
| 113 | - $container->share( |
|
| 114 | - \InfluxDB2\Client::class, |
|
| 115 | - function (Container $container) { |
|
| 116 | - /** @var \Joomla\Registry\Registry $config */ |
|
| 117 | - $config = $container->get('config'); |
|
| 118 | - $options = (array) $config->get('influxdb'); |
|
| 119 | - |
|
| 120 | - return new \InfluxDB2\Client($options); |
|
| 121 | - } |
|
| 122 | - ); |
|
| 113 | + $container->share( |
|
| 114 | + \InfluxDB2\Client::class, |
|
| 115 | + function (Container $container) { |
|
| 116 | + /** @var \Joomla\Registry\Registry $config */ |
|
| 117 | + $config = $container->get('config'); |
|
| 118 | + $options = (array) $config->get('influxdb'); |
|
| 119 | + |
|
| 120 | + return new \InfluxDB2\Client($options); |
|
| 121 | + } |
|
| 122 | + ); |
|
| 123 | 123 | |
| 124 | 124 | |
| 125 | 125 | return $container; |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | |
| 113 | 113 | $container->share( |
| 114 | 114 | \InfluxDB2\Client::class, |
| 115 | - function (Container $container) { |
|
| 115 | + function(Container $container) { |
|
| 116 | 116 | /** @var \Joomla\Registry\Registry $config */ |
| 117 | 117 | $config = $container->get('config'); |
| 118 | 118 | $options = (array) $config->get('influxdb'); |
@@ -133,11 +133,11 @@ discard block |
||
| 133 | 133 | private function loadConfiguration(): Registry |
| 134 | 134 | { |
| 135 | 135 | $registry = new Registry; |
| 136 | - $registry->loadFile(APPROOT . '/etc/config.dist.json'); |
|
| 136 | + $registry->loadFile(APPROOT.'/etc/config.dist.json'); |
|
| 137 | 137 | |
| 138 | - if (file_exists(APPROOT . '/etc/config.json')) |
|
| 138 | + if (file_exists(APPROOT.'/etc/config.json')) |
|
| 139 | 139 | { |
| 140 | - $registry->loadFile(APPROOT . '/etc/config.json'); |
|
| 140 | + $registry->loadFile(APPROOT.'/etc/config.json'); |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | return $registry; |