Skip to content

Commit

Permalink
Fixed style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Qrious committed Mar 3, 2019
1 parent 5571668 commit a637035
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/ACFProInstallerPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -174,16 +174,16 @@ protected function getKeyFromEnv()
*/
private function appendLicenseKey($url): string
{
$components = parse_url($url);
$c = parse_url($url);
$queryParams = [];
parse_str($components['query'], $queryParams);
parse_str($c['query'], $queryParams);
$queryParams['k'] = $this->getKeyFromEnv();
$components['query'] = http_build_query($queryParams);
$auth = (isset($components['user']) ||
isset($components['pass'])) ? "{$components['user']}:{$components['pass']}@" : "";
$port = (isset($components['port']) && !in_array(["443", " 80"],
$components['port'])) ? ":{$components['port']}" : "";
$r = "{$components['scheme']}://{$auth}{$components['host']}{$port}{$components['path']}?{$components['query']}";
$c['query'] = http_build_query($queryParams);
$auth = (isset($c['user']) ||
isset($c['pass'])) ? "{$c['user']}:{$c['pass']}@" : "";
$port = (isset($c['port']) && !in_array(["443", " 80"], $c['port'])) ?
":{$c['port']}" : "";
$r = "{$c['scheme']}://{$auth}{$c['host']}{$port}{$c['path']}?{$c['query']}";
return $r;
}
}

0 comments on commit a637035

Please sign in to comment.