Skip to content

Commit

Permalink
fix styleci issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vrobert78 committed Jan 18, 2024
1 parent 24353f6 commit 6ec7c33
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Communication/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,19 @@ public function __construct($socketClient, LoggerInterface $logger = null, int $
// create socket client
if (\is_string($socketClient)) {

if (\in_array(\parse_url($socketClient, PHP_URL_SCHEME), ['http', 'https'])) {
if (\in_array(\parse_url($socketClient, \PHP_URL_SCHEME), ['http', 'https'])) {

$configURL = $socketClient.'/json/version';

if (!\function_exists('curl_init')) {
throw new \Exception("curl is not available");
throw new \Exception('curl is not available');
}

$curl = curl_init($configURL);
curl_setopt($curl, CURLOPT_URL, $configURL);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$resp = curl_exec($curl);
curl_close($curl);
$curl = \curl_init($configURL);
\curl_setopt($curl, CURLOPT_URL, $configURL);
\curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$resp = \curl_exec($curl);
\curl_close($curl);

if (false === $resp) {
throw new \Exception("Unable to request $configURL");
Expand Down

0 comments on commit 6ec7c33

Please sign in to comment.