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 {