Skip to content

Commit

Permalink
Remove if statement to clean up initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
CrshOverride authored and hush-hush committed Sep 27, 2018
1 parent 452e643 commit bbff312
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/DogStatsd.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,9 @@ class DogStatsd
*/
public function __construct(array $config = array())
{
if (isset($config['socket_path'])) {
$this->socketPath = $config['socket_path'];
$this->host = null;
$this->port = null;
} else {
$this->host = isset($config['host']) ? $config['host'] : 'localhost';
$this->port = isset($config['port']) ? $config['port'] : 8125;
$this->socketPath = null;
}
$this->host = isset($config['host']) ? $config['host'] : 'localhost';
$this->port = isset($config['port']) ? $config['port'] : 8125;
$this->socketPath = isset($config['socket_path']) ? $config['socket_path'] : null;

$this->datadogHost = isset($config['datadog_host']) ? $config['datadog_host'] : 'https://app.datadoghq.com';
$this->apiCurlSslVerifyHost = isset($config['curl_ssl_verify_host']) ? $config['curl_ssl_verify_host'] : 2;
Expand Down

0 comments on commit bbff312

Please sign in to comment.