Skip to content

Commit a9bad63

Browse files
committed
ran pint
1 parent 557a2f4 commit a9bad63

File tree

8 files changed

+18
-20
lines changed

8 files changed

+18
-20
lines changed

src/Events/NewMicrosoft365SignInEvent.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,5 @@ class NewMicrosoft365SignInEvent
1212
use InteractsWithSockets;
1313
use SerializesModels;
1414

15-
public function __construct(public array $token)
16-
{
17-
}
15+
public function __construct(public array $token) {}
1816
}

src/Listeners/NewMicrosoft365SignInListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public function handle(object $event): void
1818
'password' => '',
1919
]);
2020

21-
(new MsGraph())->storeToken(
21+
(new MsGraph)->storeToken(
2222
$event->token['accessToken'],
2323
$event->token['refreshToken'],
2424
$event->token['expires'],

src/MsGraphServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function registerFilesystem(): void
7575
$clientId = config('msgraph.clientId');
7676
$clientSecret = config('msgraph.clientSecret');
7777

78-
$guzzle = new Client();
78+
$guzzle = new Client;
7979
$response = $guzzle->post("https://login.microsoftonline.com/$tenantId/oauth2/v2.0/token",
8080
[
8181
'headers' => [

src/Resources/Contacts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ protected function getParams(array $params, int $perPage): string
6161
'$count' => 'true',
6262
]);
6363
} else {
64-
//ensure $top, $skip and $count are part of params
64+
// ensure $top, $skip and $count are part of params
6565
if (! in_array('$top', $params)) {
6666
$params['$top'] = $perPage;
6767
}

src/Resources/Emails.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,14 @@ public function get(string $folderId = '', array $params = []): MsGraph
134134

135135
$folder = $folderId == '' ? 'Inbox' : $folderId;
136136

137-
//get inbox from folders list
137+
// get inbox from folders list
138138
$folder = MsGraph::get("me/mailFolders?\$filter=startswith(displayName,'$folder')");
139139

140140
if (isset($folder['value'][0])) {
141-
//folder id
141+
// folder id
142142
$folderId = $folder['value'][0]['id'];
143143

144-
//get messages from folderId
144+
// get messages from folderId
145145
return MsGraph::get("me/mailFolders/$folderId/messages?".$params);
146146
} else {
147147
throw new Exception('email folder not found');
@@ -162,21 +162,21 @@ public function findInlineAttachments(array $email): array
162162
{
163163
$attachments = self::findAttachments($email['id']);
164164

165-
//replace every case of <img='cid:' with the base64 image
165+
// replace every case of <img='cid:' with the base64 image
166166
$email['body']['content'] = preg_replace_callback(
167167
'~cid.*?"~',
168168
function (array $m) use ($attachments) {
169-
//remove the last quote
169+
// remove the last quote
170170
$parts = explode('"', $m[0]);
171171

172-
//remove cid:
172+
// remove cid:
173173
$contentId = str_replace('cid:', '', $parts[0]);
174174

175-
//loop over the attachments
175+
// loop over the attachments
176176
foreach ($attachments['value'] as $file) {
177-
//if there is a match
177+
// if there is a match
178178
if ($file['contentId'] == $contentId) {
179-
//return a base64 image with a quote
179+
// return a base64 image with a quote
180180
return 'data:'.$file['contentType'].';base64,'.$file['contentBytes'].'"';
181181
}
182182
}

src/Resources/Files.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function createFolder(string $name, string $path = '', string $type = 'me
5353

5454
return MsGraph::post($path, [
5555
'name' => $name,
56-
'folder' => new \stdClass(),
56+
'folder' => new \stdClass,
5757
'@microsoft.graph.conflictBehavior' => $behavior,
5858
]);
5959
}

src/Resources/Tasks/Tasks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ protected function getParams(array $params, int $perPage, string $instance): arr
6464
'$skip' => $page,
6565
];
6666
} else {
67-
//ensure $top, $skip and $count are part of params
67+
// ensure $top, $skip and $count are part of params
6868
if (! in_array('$top', $params)) {
6969
$params['$top'] = $perPage;
7070
}

tests/TestCase.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77

88
class TestCase extends Orchestra
99
{
10-
protected function getPackageProviders($app)
10+
protected function getPackageProviders($app): array
1111
{
1212
return [
1313
MsGraphServiceProvider::class,
1414
];
1515
}
1616

17-
protected function getEnvironmentSetUp($app)
17+
protected function getEnvironmentSetUp($app): void
1818
{
1919
$app['config']->set('database.default', 'mysql');
2020
$app['config']->set('database.connections.mysql', [
@@ -25,7 +25,7 @@ protected function getEnvironmentSetUp($app)
2525
]);
2626
}
2727

28-
protected function defineDatabaseMigrations()
28+
protected function defineDatabaseMigrations(): void
2929
{
3030
$this->loadLaravelMigrations();
3131

0 commit comments

Comments
 (0)