Skip to content

Commit

Permalink
♻️ parse_query to Query::parse
Browse files Browse the repository at this point in the history
  • Loading branch information
tijmenmoddit committed Oct 6, 2022
1 parent 062f0c5 commit c25e80a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/DirectAdmin/Objects/Domain.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace Omines\DirectAdmin\Objects;

use GuzzleHttp\Psr7\Query;
use Omines\DirectAdmin\Context\UserContext;
use Omines\DirectAdmin\DirectAdminException;
use Omines\DirectAdmin\Objects\Domains\Subdomain;
Expand Down Expand Up @@ -63,7 +64,7 @@ class Domain extends BaseObject
public function __construct($name, UserContext $context, $config)
{
parent::__construct($name, $context);
$this->setConfig($context, is_array($config) ? $config : \GuzzleHttp\Psr7\parse_query($config));
$this->setConfig($context, is_array($config) ? $config : Query::parse($config));
}

/**
Expand Down
5 changes: 3 additions & 2 deletions src/DirectAdmin/Objects/Email/Mailbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

namespace Omines\DirectAdmin\Objects\Email;

use GuzzleHttp\Psr7\Query;
use Omines\DirectAdmin\Objects\Domain;

/**
Expand All @@ -32,7 +33,7 @@ public function __construct($prefix, Domain $domain, $config = null)
{
parent::__construct($prefix, $domain);
if (isset($config)) {
$this->setCache(self::CACHE_DATA, is_string($config) ? \GuzzleHttp\Psr7\parse_query($config) : $config);
$this->setCache(self::CACHE_DATA, is_string($config) ? Query::parse($config) : $config);
}
}

Expand Down Expand Up @@ -145,7 +146,7 @@ protected function getData($key)
'action' => 'full_list',
]);

return \GuzzleHttp\Psr7\parse_query($result[$this->getPrefix()]);
return Query::parse($result[$this->getPrefix()]);
});
}
}

0 comments on commit c25e80a

Please sign in to comment.