Skip to content

Commit

Permalink
Merge pull request #3 from talvbansal/analysis-EAWpN9
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
talvbansal authored Nov 25, 2019
2 parents 5f333b2 + 6b2afa1 commit fa59c1e
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/MsTeamsChannel.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public function send($notifiable, Notification $notification)
}

$code = collect(Arr::get($data, 'code', []))
->map(function ($code){
->map(function ($code) {
return [
"name" => "Code",
"value" => "<pre>$code</pre>"
'name' => 'Code',
'value' => "<pre>$code</pre>",
];
});

Expand All @@ -73,19 +73,19 @@ public function send($notifiable, Notification $notification)
});

$payload = [
"@type" => "MessageCard",
"@context" => "http://schema.org/extensions",
"summary" => Arr::get($data, 'title', 'Incoming notification'),
"themeColor" => $this->getNotificationType(Arr::get($data, 'type', 'success')),
"title" => Arr::get($data, 'title'),
'@type' => 'MessageCard',
'@context' => 'http://schema.org/extensions',
'summary' => Arr::get($data, 'title', 'Incoming notification'),
'themeColor' => $this->getNotificationType(Arr::get($data, 'type', 'success')),
'title' => Arr::get($data, 'title'),

"sections" => [
'sections' => [
[
"activitySubtitle" => sprintf("%s : (%s)",config('app.url'), config('app.env')),
"text" => Arr::get($data, 'text'),
"facts" => $code,
"images" => $images,
]
'activitySubtitle' => sprintf('%s : (%s)', config('app.url'), config('app.env')),
'text' => Arr::get($data, 'text'),
'facts' => $code,
'images' => $images,
],
],

'potentialAction' => $potentialActions,
Expand All @@ -112,7 +112,7 @@ public function send($notifiable, Notification $notification)
*/
private function getNotificationType($type = 'info') : string
{
switch($type){
switch ($type) {
case 'error':
return '#D8000C';
break;
Expand Down

0 comments on commit fa59c1e

Please sign in to comment.