diff --git a/src/Appwrite/Auth/Auth.php b/src/Appwrite/Auth/Auth.php index 4ea975185..603983c7f 100644 --- a/src/Appwrite/Auth/Auth.php +++ b/src/Appwrite/Auth/Auth.php @@ -241,14 +241,14 @@ class Auth /** * Is Previligged User? - * + * * @param array $roles - * + * * @return bool */ public static function isPrivilegedUser(array $roles): bool { - if( + if ( array_key_exists('role:'.self::USER_ROLE_OWNER, $roles) || array_key_exists('role:'.self::USER_ROLE_DEVELOPER, $roles) || array_key_exists('role:'.self::USER_ROLE_ADMIN, $roles) @@ -261,14 +261,14 @@ class Auth /** * Is App User? - * + * * @param array $roles - * + * * @return bool */ public static function isAppUser(array $roles): bool { - if(array_key_exists('role:'.self::USER_ROLE_APP, $roles)) { + if (array_key_exists('role:'.self::USER_ROLE_APP, $roles)) { return true; } @@ -277,9 +277,9 @@ class Auth /** * Returns all roles for a user. - * - * @param Document $user - * @return array + * + * @param Document $user + * @return array */ public static function getRoles(Document $user): array { diff --git a/src/Appwrite/Auth/OAuth2/Box.php b/src/Appwrite/Auth/OAuth2/Box.php index 7fbcf5954..ad626b633 100644 --- a/src/Appwrite/Auth/OAuth2/Box.php +++ b/src/Appwrite/Auth/OAuth2/Box.php @@ -28,7 +28,7 @@ class Box extends OAuth2 * @var array */ protected $scopes = [ - 'manage_app_users', + 'manage_app_users', ]; /** @@ -45,10 +45,10 @@ class Box extends OAuth2 public function getLoginURL(): string { $url = $this->endpoint . 'authorize?'. - \http_build_query([ + \http_build_query([ 'response_type' => 'code', 'client_id' => $this->appID, - 'scope' => \implode(',', $this->getScopes()), + 'scope' => \implode(',', $this->getScopes()), 'redirect_uri' => $this->callback, 'state' => \json_encode($this->state), ]); @@ -156,4 +156,4 @@ class Box extends OAuth2 return $this->user; } -} \ No newline at end of file +} diff --git a/src/Appwrite/Auth/OAuth2/PaypalSandbox.php b/src/Appwrite/Auth/OAuth2/PaypalSandbox.php index 8c4baee6b..82698555d 100644 --- a/src/Appwrite/Auth/OAuth2/PaypalSandbox.php +++ b/src/Appwrite/Auth/OAuth2/PaypalSandbox.php @@ -4,7 +4,6 @@ namespace Appwrite\Auth\OAuth2; use Appwrite\Auth\OAuth2\Paypal; - class PaypalSandbox extends Paypal { protected $environment = 'sandbox'; diff --git a/src/Appwrite/Auth/OAuth2/Twitch.php b/src/Appwrite/Auth/OAuth2/Twitch.php index 9608f9f61..7e0c04033 100644 --- a/src/Appwrite/Auth/OAuth2/Twitch.php +++ b/src/Appwrite/Auth/OAuth2/Twitch.php @@ -139,7 +139,8 @@ class Twitch extends OAuth2 if (empty($this->user)) { $response = \json_decode($this->request( 'GET', - $this->resourceEndpoint , [ + $this->resourceEndpoint, + [ 'Authorization: Bearer '.\urlencode($accessToken), 'Client-Id: '. \urlencode($this->appID) ]