@@ -89,7 +89,7 @@ public static function setUserModel(string $model): static
89
89
/**
90
90
* @throws Exception
91
91
*/
92
- public function connect (string $ id = null ): Redirector |RedirectResponse
92
+ public function connect (? string $ id = null ): Redirector |RedirectResponse
93
93
{
94
94
$ id = $ this ->getUserId ($ id );
95
95
@@ -142,7 +142,7 @@ public function connect(string $id = null): Redirector|RedirectResponse
142
142
return redirect (config ('msgraph.msgraphLandingUri ' ));
143
143
}
144
144
145
- public function isConnected (string $ id = null ): bool
145
+ public function isConnected (? string $ id = null ): bool
146
146
{
147
147
$ token = $ this ->getTokenData ($ id );
148
148
@@ -166,7 +166,7 @@ public function disconnect(string $redirectPath = '/', bool $logout = true): Red
166
166
return redirect ()->away ('https://login.microsoftonline.com/common/oauth2/v2.0/logout?post_logout_redirect_uri= ' .url ($ redirectPath ));
167
167
}
168
168
169
- public function getAccessToken (string $ id = null , bool $ redirectWhenNotConnected = true ): Application |Redirector |string |RedirectResponse |null
169
+ public function getAccessToken (? string $ id = null , bool $ redirectWhenNotConnected = true ): Application |Redirector |string |RedirectResponse |null
170
170
{
171
171
$ token = $ this ->getTokenData ($ id );
172
172
$ id = $ this ->getUserId ($ id );
@@ -190,7 +190,7 @@ public function getAccessToken(string $id = null, bool $redirectWhenNotConnected
190
190
return $ token ->access_token ;
191
191
}
192
192
193
- public function getTokenData (string $ id = null ): ?MsGraphToken
193
+ public function getTokenData (? string $ id = null ): ?MsGraphToken
194
194
{
195
195
$ id = $ this ->getUserId ($ id );
196
196
@@ -278,7 +278,7 @@ protected function renewExpiringToken(object $token, string $id, string $email):
278
278
/**
279
279
* @throws Exception
280
280
*/
281
- protected function guzzle (string $ type , string $ request , array $ data = [], array $ headers = [], int |string $ id = null ): mixed
281
+ protected function guzzle (string $ type , string $ request , array $ data = [], array $ headers = [], int |string | null $ id = null ): mixed
282
282
{
283
283
try {
284
284
$ client = new Client ;
@@ -322,7 +322,7 @@ protected function isJson(string $string): bool
322
322
return is_array (json_decode ($ string , true )) && (json_last_error () == JSON_ERROR_NONE );
323
323
}
324
324
325
- protected function getUserId (string $ id = null ): ?string
325
+ protected function getUserId (? string $ id = null ): ?string
326
326
{
327
327
if ($ id === null ) {
328
328
$ id = auth ()->id ();
0 commit comments