From 79726dbfb64c756fcd13d4c5605b4f529ea2d0a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Tue, 5 Sep 2023 13:16:20 +0200 Subject: [PATCH] Fix formatting --- app/controllers/api/vcs.php | 2 +- src/Appwrite/Auth/OAuth2/Exception.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/vcs.php b/app/controllers/api/vcs.php index 894e083dfb..fc352e4809 100644 --- a/app/controllers/api/vcs.php +++ b/app/controllers/api/vcs.php @@ -250,7 +250,7 @@ App::get('/v1/vcs/github/authorize') $appName = App::getEnv('_APP_VCS_GITHUB_APP_NAME'); - if(empty($appName)) { + if (empty($appName)) { throw new Exception(Exception::GENERAL_SERVER_ERROR, 'GitHub App name is not configured. Please configure VCS (Version Control System) variables in .env file.'); } diff --git a/src/Appwrite/Auth/OAuth2/Exception.php b/src/Appwrite/Auth/OAuth2/Exception.php index c3b574fb71..df5054ae9a 100644 --- a/src/Appwrite/Auth/OAuth2/Exception.php +++ b/src/Appwrite/Auth/OAuth2/Exception.php @@ -19,7 +19,7 @@ class Exception extends AppwriteException if (\is_array($decoded['error'] ?? '')) { $this->error = $decoded['error']['status'] ?? 'Unknown error'; $this->errorDescription = $decoded['error']['message'] ?? 'No description'; - } else if (\is_array($decoded['errors'] ?? '')) { + } elseif (\is_array($decoded['errors'] ?? '')) { $this->error = $decoded['error'] ?? $decoded['message'] ?? 'Unknown error'; $this->errorDescription = $decoded['errors'][0]['message'] ?? 'No description'; } else {