| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 24 | 1 | public static function createClient(string $host, string $httpPort, string $udpPort, string $user, string $password, bool $udp = false) |
|
| 25 | { |
||
| 26 | 1 | $client = new Client($host, $httpPort, $user, $password); |
|
| 27 | |||
| 28 | 1 | if ($udp) { |
|
| 29 | 1 | $client->setDriver(new \InfluxDB\Driver\UDP($client->getHost(), $udpPort)); |
|
| 30 | } |
||
| 31 | |||
| 32 | 1 | return $client; |
|
| 33 | } |
||
| 34 | } |
||
| 35 |