From c97c77da59ce7752be2c9f44123d549f1f0b9d16 Mon Sep 17 00:00:00 2001 From: Hamlet Date: Mon, 16 Jan 2017 11:43:19 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Vuforia/Exceptions/ResourceNotFoundException.php | 1 - src/Vuforia/Request.php | 1 - src/Vuforia/Vuforia.php | 5 ++--- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/Vuforia/Exceptions/ResourceNotFoundException.php b/src/Vuforia/Exceptions/ResourceNotFoundException.php index cca0970..e661eab 100644 --- a/src/Vuforia/Exceptions/ResourceNotFoundException.php +++ b/src/Vuforia/Exceptions/ResourceNotFoundException.php @@ -4,5 +4,4 @@ class ResourceNotFoundException extends \Exception { - } diff --git a/src/Vuforia/Request.php b/src/Vuforia/Request.php index f293b21..2634af7 100644 --- a/src/Vuforia/Request.php +++ b/src/Vuforia/Request.php @@ -132,7 +132,6 @@ private function call($method, string $path, $body = null):ResponseInterface try { return $this->guzzleClient()->send($request); } catch (\Exception $e) { - if ($e->getCode() == 404) { throw new ResourceNotFoundException("Your requested resource ({$method} {$url}) not found."); } diff --git a/src/Vuforia/Vuforia.php b/src/Vuforia/Vuforia.php index 04e7502..0154e0b 100644 --- a/src/Vuforia/Vuforia.php +++ b/src/Vuforia/Vuforia.php @@ -72,8 +72,7 @@ public static function config($access_key, $secret_key) { if (is_null(self::$instance)) { self::$instance = new self($access_key, $secret_key); - } - else { + } else { self::$instance->reconfigure($access_key, $secret_key); } } @@ -95,7 +94,7 @@ public static function instance() */ public function getRequestAttribute() { - $hash = md5($this->access_key . $this->secret_key); + $hash = md5($this->access_key.$this->secret_key); if (!array_key_exists($hash, $this->request_instances)) { $this->request_instances[$hash] = new Request($this->access_key, $this->secret_key);