Completed
Pull Request — master (#58)
by Phecho
03:31
created
app/Http/Controllers/Api/CommentController.php 1 patch
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      * @param \Symfony\Component\HttpFoundation\Request $request
33 33
      * @param \Illuminate\Contracts\Auth\Guard          $auth
34 34
      *
35
-     * @return \Illuminate\Http\JsonResponse
35
+     * @return \Illuminate\Http\Response
36 36
      */
37 37
     public function getComments(Request $request, Guard $auth)
38 38
     {
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      *
47 47
      * @param \Gitamin\Models\Comment $comment
48 48
      *
49
-     * @return \Illuminate\Http\JsonResponse
49
+     * @return \Illuminate\Http\Response
50 50
      */
51 51
     public function getComment(Comment $comment)
52 52
     {
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      *
59 59
      * @param \Illuminate\Contracts\Auth\Guard $auth
60 60
      *
61
-     * @return \Illuminate\Http\JsonResponse
61
+     * @return \Illuminate\Http\Response
62 62
      */
63 63
     public function postComments(Guard $auth)
64 64
     {
@@ -80,9 +80,9 @@  discard block
 block discarded – undo
80 80
     /**
81 81
      * Update an existing comment.
82 82
      *
83
-     * @param \Gitamin\Models\Inicdent $comment
83
+     * @param Comment $comment
84 84
      *
85
-     * @return \Illuminate\Http\JsonResponse
85
+     * @return \Illuminate\Http\Response
86 86
      */
87 87
     public function putComment(Comment $comment)
88 88
     {
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      *
104 104
      * @param \Gitamin\Models\Comment $comment
105 105
      *
106
-     * @return \Illuminate\Http\JsonResponse
106
+     * @return \Illuminate\Http\Response
107 107
      */
108 108
     public function deleteComment(Comment $comment)
109 109
     {
Please login to merge, or discard this patch.
app/Handlers/Commands/Comment/UpdateCommentCommandHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
             'team_id'     => $command->team_id,
55 55
         ];
56 56
 
57
-        return array_filter($params, function ($val) {
57
+        return array_filter($params, function($val) {
58 58
             return $val !== null;
59 59
         });
60 60
     }
Please login to merge, or discard this patch.
app/Handlers/Events/Issue/SendIssueEmailNotificationHandler.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     /**
37 37
      * Create a new send issue email notification handler.
38 38
      *
39
-     * @param \Illuminate\Contracts\Mail\Mailer $mailer
39
+     * @param MailQueue $mailer
40 40
      * @param \Gitamin\Models\Subscriber        $subscriber
41 41
      *
42 42
      * @return void
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     /**
51 51
      * Handle the event.
52 52
      *
53
-     * @param \Gitamin\Events\Issue\IssueHasAddedEvent $event
53
+     * @param IssueWasAddedEvent $event
54 54
      *
55 55
      * @return void
56 56
      */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,11 +77,11 @@
 block discarded – undo
77 77
                     'token'            => $subscriber->token,
78 78
                     'unsubscribe_link' => route('subscribe.unsubscribe', ['code' => $subscriber->verify_code]),
79 79
                 ];
80
-                error_log(var_export($mail,true), 3, '/tmp/mail.log');
80
+                error_log(var_export($mail, true), 3, '/tmp/mail.log');
81 81
                 $this->mailer->queue([
82 82
                     'html' => 'emails.issues.new-html',
83 83
                     'text' => 'emails.issues.new-text',
84
-                ], $mail, function (Message $message) use ($mail) {
84
+                ], $mail, function(Message $message) use ($mail) {
85 85
                     $message->to($mail['email'])->subject($mail['subject']);
86 86
                 });
87 87
             }
Please login to merge, or discard this patch.
app/Handlers/Events/Project/SendProjectMomentHandler.php 3 patches
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -13,11 +13,7 @@
 block discarded – undo
13 13
 
14 14
 use Illuminate\Foundation\Bus\DispatchesJobs;
15 15
 use Gitamin\Events\Project\ProjectEventInterface;
16
-use Gitamin\Events\Project\ProjectWasAddedEvent;
17
-use Gitamin\Events\Project\ProjectWasUpdatedEvent;
18 16
 use Gitamin\Events\Project\ProjectWasRemovedEvent;
19
-use Gitamin\Handlers\Commands\Moment\AddMomentCommandHandler;
20
-use Gitamin\Commands\Moment\AddMomentCommand;
21 17
 use Gitamin\Models\Project;
22 18
 use Gitamin\Models\Moment;
23 19
 
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      * @param \Gitamin\Models\Project $project
49 49
      * @param int                     $action
50 50
      *
51
-    */
51
+     */
52 52
     protected function trigger(Project &$project, $action)
53 53
     {
54 54
         $data = [
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function handle(ProjectEventInterface $event)
33 33
     {
34
-        if($event instanceof ProjectWasUpdateEvent) {
34
+        if ($event instanceof ProjectWasUpdateEvent) {
35 35
             $action = Moment::UPDATED;
36 36
         } else if ($event instanceof ProjectWasRemovedEvent) {
37 37
             $action = Moment::CLOSED;
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      * @param int                     $action
50 50
      *
51 51
     */
52
-    protected function trigger(Project &$project, $action)
52
+    protected function trigger(Project & $project, $action)
53 53
     {
54 54
         $data = [
55 55
             'target_type' => 'Project',
Please login to merge, or discard this patch.
app/Http/Controllers/Projects/IssuesController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,6 @@
 block discarded – undo
13 13
 
14 14
 use Gitamin\Commands\Issue\AddIssueCommand;
15 15
 use Gitamin\Http\Controllers\Controller;
16
-use Gitamin\Models\Issue;
17 16
 use Gitamin\Models\Project;
18 17
 use GrahamCampbell\Binput\Facades\Binput;
19 18
 use Illuminate\Support\Facades\Auth;
Please login to merge, or discard this patch.
app/Handlers/Commands/Moment/AddMomentCommandHandler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,10 +51,10 @@
 block discarded – undo
51 51
             'author_id' => $command->author_id,
52 52
         ];
53 53
 
54
-        if($command->title) {
54
+        if ($command->title) {
55 55
             $data['title'] = $command->title;
56 56
         }
57
-        if($command->data) {
57
+        if ($command->data) {
58 58
             $data['data'] = $command->data;
59 59
         }
60 60
         // Link with the target.
Please login to merge, or discard this patch.
app/Commands/Moment/AddMomentCommand.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@
 block discarded – undo
41 41
      */
42 42
     public $target_id;
43 43
 
44
-     /**
45
-     * The moment action.
46
-     *
47
-     * @var int
48
-     */
44
+        /**
45
+         * The moment action.
46
+         *
47
+         * @var int
48
+         */
49 49
     public $action;
50 50
 
51 51
     /**
Please login to merge, or discard this patch.