Skip to content

Commit 2f2e106

Browse files
authored
Merge pull request #137 from nasirkhan/analysis-qMmgKM
Apply fixes from StyleCI
2 parents 60e7f34 + 884211b commit 2f2e106

File tree

3 files changed

+22
-17
lines changed

3 files changed

+22
-17
lines changed

Modules/Article/Notifications/NewCommentAdded.php

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
namespace Modules\Article\Notifications;
44

55
use Illuminate\Bus\Queueable;
6-
use Illuminate\Notifications\Notification;
76
use Illuminate\Contracts\Queue\ShouldQueue;
87
use Illuminate\Notifications\Messages\MailMessage;
98
use Illuminate\Notifications\Messages\SlackMessage;
9+
use Illuminate\Notifications\Notification;
1010
use Modules\Article\Entities\Comment;
1111

1212
class NewCommentAdded extends Notification implements ShouldQueue
@@ -29,6 +29,7 @@ public function __construct(Comment $comment)
2929
* Get the notification's delivery channels.
3030
*
3131
* @param mixed $notifiable
32+
*
3233
* @return array
3334
*/
3435
public function via($notifiable)
@@ -40,14 +41,15 @@ public function via($notifiable)
4041
* Get the mail representation of the notification.
4142
*
4243
* @param mixed $notifiable
44+
*
4345
* @return \Illuminate\Notifications\Messages\MailMessage
4446
*/
4547
public function toMail($notifiable)
4648
{
4749
$comment = $this->comment;
4850
$user = $notifiable;
4951

50-
return (new MailMessage)
52+
return (new MailMessage())
5153
->line('The introduction to the notification.')
5254
->action('Notification Action', 'https://laravel.com')
5355
->line('Thank you for using our application!');
@@ -56,25 +58,26 @@ public function toMail($notifiable)
5658
/**
5759
* Get the Slack representation of the notification.
5860
*
59-
* @param mixed $notifiable
61+
* @param mixed $notifiable
62+
*
6063
* @return SlackMessage
6164
*/
6265
public function toSlack($notifiable)
6366
{
6467
$comment = $this->comment;
6568
$user = $notifiable;
6669

67-
return (new SlackMessage)
70+
return (new SlackMessage())
6871
->success()
6972
->from('BlueCube', ':incoming_envelope:')
7073
->content('New Comment: '.$comment->name.' | From:'.$comment->user_name)
7174
->attachment(function ($attachment) use ($comment) {
72-
$attachment->title('Comment '.$comment->id, route('backend.comments.show',$comment->id))
75+
$attachment->title('Comment '.$comment->id, route('backend.comments.show', $comment->id))
7376
->fields([
74-
'Post' => $comment->post_name,
75-
'User' => $comment->user_name,
77+
'Post' => $comment->post_name,
78+
'User' => $comment->user_name,
7679
'Comment' => $comment->name,
77-
'Status' => $comment->status_label_text,
80+
'Status' => $comment->status_label_text,
7881
]);
7982
});
8083
}
@@ -83,6 +86,7 @@ public function toSlack($notifiable)
8386
* Get the array representation of the notification.
8487
*
8588
* @param mixed $notifiable
89+
*
8690
* @return array
8791
*/
8892
public function toArray($notifiable)
@@ -91,14 +95,14 @@ public function toArray($notifiable)
9195
$user = $notifiable;
9296

9397
return [
94-
'id' => $comment->id,
95-
'name' => $comment->name,
96-
'comment' => $comment->comment,
97-
'post_id' => $comment->post_id,
98+
'id' => $comment->id,
99+
'name' => $comment->name,
100+
'comment' => $comment->comment,
101+
'post_id' => $comment->post_id,
98102
'post_name' => $comment->post_name,
99-
'user_id' => $comment->user_id,
103+
'user_id' => $comment->user_id,
100104
'user_name' => $comment->user_name,
101-
'status' => $comment->status,
105+
'status' => $comment->status,
102106
];
103107
}
104108
}

app/Models/User.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ public function setPasswordAttribute($password)
8989
/**
9090
* Route notifications for the Slack channel.
9191
*
92-
* @param \Illuminate\Notifications\Notification $notification
92+
* @param \Illuminate\Notifications\Notification $notification
93+
*
9394
* @return string
9495
*/
9596
public function routeNotificationForSlack($notification)

database/migrations/2019_07_08_104305_create_failed_jobs_table.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
use Illuminate\Support\Facades\Schema;
4-
use Illuminate\Database\Schema\Blueprint;
53
use Illuminate\Database\Migrations\Migration;
4+
use Illuminate\Database\Schema\Blueprint;
5+
use Illuminate\Support\Facades\Schema;
66

77
class CreateFailedJobsTable extends Migration
88
{

0 commit comments

Comments
 (0)