From e71a1cb4a9c2636811b3a981d7cd0fdc1eb29693 Mon Sep 17 00:00:00 2001 From: keepwn Date: Thu, 8 Nov 2018 12:10:27 +0800 Subject: [PATCH] Fix format problem --- src/Exception/BadResponseException.php | 17 +++++++++++++++-- src/Proxmox.php | 2 +- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/Exception/BadResponseException.php b/src/Exception/BadResponseException.php index 7b9f880..34da81a 100644 --- a/src/Exception/BadResponseException.php +++ b/src/Exception/BadResponseException.php @@ -1,7 +1,20 @@ + * @license http://opensource.org/licenses/MIT The MIT License. + */ +namespace ProxmoxVE\Exception; + +/** + * BadResponseException class. Is the exception thrown when proxmox + * return status_code >= 400, thus the ProxmoxVE API client can not be used. + * + * @author César Muñoz + */ class BadResponseException extends \RuntimeException { -} \ No newline at end of file +} diff --git a/src/Proxmox.php b/src/Proxmox.php index 9a82aab..c342dca 100644 --- a/src/Proxmox.php +++ b/src/Proxmox.php @@ -155,7 +155,7 @@ private function processHttpResponse($response) return null; } - if($response->getStatusCode() >= 400) { + if ($response->getStatusCode() >= 400) { throw new BadResponseException($response->getReasonPhrase()); }