Skip to content

Commit

Permalink
ran pint
Browse files Browse the repository at this point in the history
  • Loading branch information
dcblogdev committed Nov 14, 2024
1 parent a7b516f commit 4be08d5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 22 deletions.
4 changes: 3 additions & 1 deletion src/Events/NewMicrosoft365SignInEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ class NewMicrosoft365SignInEvent
use InteractsWithSockets;
use SerializesModels;

public function __construct(public array $token) {}
public function __construct(public array $token)
{
}
}
40 changes: 20 additions & 20 deletions src/Resources/Emails.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,30 +274,30 @@ protected function prepareEmail(): array

$attachmentArray = [];
foreach ($attachments as $file) {
if (array_key_exists('name', $file) && array_key_exists('contentBytes', $file)) {
$attachmentArray[] = [
'@odata.type' => '#microsoft.graph.fileAttachment',
'name' => $file['name'],
'contentBytes' => $file['contentBytes'],
];
} else {
$path = pathinfo($file);

$attachmentArray[] = [
'@odata.type' => '#microsoft.graph.fileAttachment',
'name' => $path['basename'],
'contentType' => mime_content_type($file),
'contentBytes' => base64_encode(file_get_contents($file)),
];
}
if (array_key_exists('name', $file) && array_key_exists('contentBytes', $file)) {
$attachmentArray[] = [
'@odata.type' => '#microsoft.graph.fileAttachment',
'name' => $file['name'],
'contentBytes' => $file['contentBytes'],
];
} else {
$path = pathinfo($file);

$attachmentArray[] = [
'@odata.type' => '#microsoft.graph.fileAttachment',
'name' => $path['basename'],
'contentType' => mime_content_type($file),
'contentBytes' => base64_encode(file_get_contents($file)),
];
}
}

$singleValueExtendedPropertiesarray = [];
foreach ($singleValueExtendedProperties as $value) {
$singleValueExtendedPropertiesarray[] = [
'id' => $value['id'],
'value' => $value['value'],
];
$singleValueExtendedPropertiesarray[] = [
'id' => $value['id'],
'value' => $value['value'],
];
}

$envelope = [];
Expand Down
1 change: 0 additions & 1 deletion tests/MsGraphTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Illuminate\Http\RedirectResponse;
use Illuminate\Routing\Redirector;
use Illuminate\Support\Facades\Auth;
use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
use League\OAuth2\Client\Provider\GenericProvider;
use League\OAuth2\Client\Token\AccessToken;
use Mockery\MockInterface;
Expand Down

0 comments on commit 4be08d5

Please sign in to comment.