Fix command sending error handling and bad assertion order
This commit is contained in:
parent
ee0da206c1
commit
62cd03d684
5 changed files with 20 additions and 15 deletions
|
@ -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),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue