Skip to content

Commit

Permalink
Correct constant values
Browse files Browse the repository at this point in the history
  • Loading branch information
xtophe38 committed Jul 25, 2024
1 parent 241b211 commit e2d32b2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/AzureMSSQLAzureCollector.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public function AttributeIsOptional($sAttCode): bool
protected function BuildUrl($aParameters): string
{
if (!array_key_exists(self::URI_PARAM_SUBSCRIPTION, $aParameters) || !array_key_exists(self::URI_PARAM_RESOURCEGROUP,
$aParameters) || !array_key_exists(self::URI_PARAM_SERVER, $aParameters)) {
$aParameters) || !array_key_exists(self::URI_PARAM_MSSQL_SERVER, $aParameters)) {
return '';
} else {
$sUrl = $this->sResource.'subscriptions/'.$aParameters[self::URI_PARAM_SUBSCRIPTION];
$sUrl .= '/resourceGroups/'.$aParameters[self::URI_PARAM_RESOURCEGROUP];
$sUrl .= '/providers/Microsoft.Sql/servers/'.$aParameters[self::URI_PARAM_SERVER];
$sUrl .= '/providers/Microsoft.Sql/servers/'.$aParameters[self::URI_PARAM_MSSQL_SERVER];
$sUrl .= '/databases?api-version='.$this->sApiVersion;

return $sUrl;
Expand Down
4 changes: 2 additions & 2 deletions src/AzureMariaDBAzureCollector.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public function AttributeIsOptional($sAttCode): bool
protected function BuildUrl($aParameters): string
{
if (!array_key_exists(self::URI_PARAM_SUBSCRIPTION, $aParameters) || !array_key_exists(self::URI_PARAM_RESOURCEGROUP,
$aParameters) || !array_key_exists(self::URI_PARAM_SERVER, $aParameters)) {
$aParameters) || !array_key_exists(self::URI_PARAM_MARIADB_SERVER, $aParameters)) {
return '';
} else {
$sUrl = $this->sResource.'subscriptions/'.$aParameters[self::URI_PARAM_SUBSCRIPTION];
$sUrl .= '/resourceGroups/'.$aParameters[self::URI_PARAM_RESOURCEGROUP];
$sUrl .= '/providers/Microsoft.DBforMariaDB/servers/'.$aParameters[self::URI_PARAM_SERVER];
$sUrl .= '/providers/Microsoft.DBforMariaDB/servers/'.$aParameters[self::URI_PARAM_MARIADB_SERVER];
$sUrl .= '/databases?api-version='.$this->sApiVersion;

return $sUrl;
Expand Down
4 changes: 2 additions & 2 deletions src/AzureMySQLAzureCollector.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public function AttributeIsOptional($sAttCode): bool
protected function BuildUrl($aParameters): string
{
if (!array_key_exists(self::URI_PARAM_SUBSCRIPTION, $aParameters) || !array_key_exists(self::URI_PARAM_RESOURCEGROUP,
$aParameters) || !array_key_exists(self::URI_PARAM_SERVER, $aParameters)) {
$aParameters) || !array_key_exists(self::URI_PARAM_MySQL_SERVER, $aParameters)) {
return '';
} else {
$sUrl = $this->sResource.'subscriptions/'.$aParameters[self::URI_PARAM_SUBSCRIPTION];
$sUrl .= '/resourceGroups/'.$aParameters[self::URI_PARAM_RESOURCEGROUP];
$sUrl .= '/providers/Microsoft.DBforMySQL/flexibleServers/'.$aParameters[self::URI_PARAM_SERVER];
$sUrl .= '/providers/Microsoft.DBforMySQL/flexibleServers/'.$aParameters[self::URI_PARAM_MySQL_SERVER];
$sUrl .= '/databases?api-version='.$this->sApiVersion;

return $sUrl;
Expand Down
4 changes: 2 additions & 2 deletions src/AzurePostgreAzureCollector.class.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ public function AttributeIsOptional($sAttCode): bool
protected function BuildUrl($aParameters): string
{
if (!array_key_exists(self::URI_PARAM_SUBSCRIPTION, $aParameters) || !array_key_exists(self::URI_PARAM_RESOURCEGROUP,
$aParameters) || !array_key_exists(self::URI_PARAM_SERVER, $aParameters)) {
$aParameters) || !array_key_exists(self::URI_PARAM_POSTGRE_SERVER, $aParameters)) {
return '';
} else {
$sUrl = $this->sResource.'subscriptions/'.$aParameters[self::URI_PARAM_SUBSCRIPTION];
$sUrl .= '/resourceGroups/'.$aParameters[self::URI_PARAM_RESOURCEGROUP];
$sUrl .= '/providers/Microsoft.DBForPostgreSql/flexibleServers/'.$aParameters[self::URI_PARAM_SERVER];
$sUrl .= '/providers/Microsoft.DBForPostgreSql/flexibleServers/'.$aParameters[self::URI_PARAM_POSTGRE_SERVER];
$sUrl .= '/databases?api-version='.$this->sApiVersion;

return $sUrl;
Expand Down

0 comments on commit e2d32b2

Please sign in to comment.