Fix command sending error handling and bad assertion order

This commit is contained in:
Dane Everitt 2019-09-05 21:16:36 -07:00
parent ee0da206c1
commit 62cd03d684
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
5 changed files with 20 additions and 15 deletions

View file

@ -16,7 +16,7 @@ class DaemonCommandRepository extends DaemonRepository
*/
public function send($command): ResponseInterface
{
Assert::isInstanceOf(Server::class, $this->server);
Assert::isInstanceOf($this->server, Server::class);
return $this->getHttpClient()->post(
sprintf('/api/servers/%s/commands', $this->server->uuid),