Passed
Branch main (374ac1)
by Leandro
11:19
created
Category
example/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
 <a href="<?= $url; ?>" title="Autenticar"><button>Autenticar</button></a>
17 17
 <?php
18 18
 echo "<h1>GET TOKEN</h1>";
19
-if(isset($_GET['code'])){
19
+if (isset($_GET['code'])) {
20 20
     $data = (new Auth)->accessToken(GOOGLE_CLIENT_ID, GOOGLE_CLIENT_REDIRECT_URL, GOOGLE_CLIENT_SECRET, $_GET['code']);
21 21
     $token = $data->access_token;
22 22
     $refresh = $data->refresh_token;
Please login to merge, or discard this patch.
src/Auth.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
         $param = array_map("strip_tags", $param);
32 32
 
33
-        return "https://accounts.google.com/o/oauth2/auth?".http_build_query($param);
33
+        return "https://accounts.google.com/o/oauth2/auth?" . http_build_query($param);
34 34
     }
35 35
 
36 36
     public function accessToken(string $clientId, string $uriRedirect, string $clientSecret, string $code): ?object
Please login to merge, or discard this patch.