Skip to content

Commit d679983

Browse files
committed
ran pint
1 parent 323b870 commit d679983

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/Helpers/Paginator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public function page_links(): string
117117
return $pagination;
118118
}
119119

120-
public function page_links_array(string $path = '?', string $ext = null): array
120+
public function page_links_array(string $path = '?', ?string $ext = null): array
121121
{
122122
$lastpage = ceil($this->totalRows / $this->perPage);
123123
$pages = [];

src/MsGraph.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static function setUserModel(string $model): static
8989
/**
9090
* @throws Exception
9191
*/
92-
public function connect(string $id = null): Redirector|RedirectResponse
92+
public function connect(?string $id = null): Redirector|RedirectResponse
9393
{
9494
$id = $this->getUserId($id);
9595

@@ -142,7 +142,7 @@ public function connect(string $id = null): Redirector|RedirectResponse
142142
return redirect(config('msgraph.msgraphLandingUri'));
143143
}
144144

145-
public function isConnected(string $id = null): bool
145+
public function isConnected(?string $id = null): bool
146146
{
147147
$token = $this->getTokenData($id);
148148

@@ -166,7 +166,7 @@ public function disconnect(string $redirectPath = '/', bool $logout = true): Red
166166
return redirect()->away('https://login.microsoftonline.com/common/oauth2/v2.0/logout?post_logout_redirect_uri='.url($redirectPath));
167167
}
168168

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
170170
{
171171
$token = $this->getTokenData($id);
172172
$id = $this->getUserId($id);
@@ -190,7 +190,7 @@ public function getAccessToken(string $id = null, bool $redirectWhenNotConnected
190190
return $token->access_token;
191191
}
192192

193-
public function getTokenData(string $id = null): ?MsGraphToken
193+
public function getTokenData(?string $id = null): ?MsGraphToken
194194
{
195195
$id = $this->getUserId($id);
196196

@@ -278,7 +278,7 @@ protected function renewExpiringToken(object $token, string $id, string $email):
278278
/**
279279
* @throws Exception
280280
*/
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
282282
{
283283
try {
284284
$client = new Client;
@@ -322,7 +322,7 @@ protected function isJson(string $string): bool
322322
return is_array(json_decode($string, true)) && (json_last_error() == JSON_ERROR_NONE);
323323
}
324324

325-
protected function getUserId(string $id = null): ?string
325+
protected function getUserId(?string $id = null): ?string
326326
{
327327
if ($id === null) {
328328
$id = auth()->id();

0 commit comments

Comments
 (0)