Completed
Push — master ( 28f331...347733 )
by Phecho
03:40
created

UpdateCommentCommand::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of Gitamin.
5
 * 
6
 * Copyright (C) 2015-2016 The Gitamin Team
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Gitamin\Commands\Comment;
13
14
use Gitamin\Models\Comment;
15
16
final class UpdateCommentCommand
17
{
18
    /**
19
     * The comment to update.
20
     *
21
     * @var \Gitamin\Models\Comment
22
     */
23
    public $comment;
24
25
    /**
26
     * The comment message.
27
     *
28
     * @var string
29
     */
30
    public $message;
31
32
    /**
33
     * The validation rules.
34
     *
35
     * @var string[]
36
     */
37
    public $rules = [
38
        'message'     => 'required|string',
39
    ];
40
41
    /**
42
     * Create a new update comment command instance.
43
     *
44
     * @param string $message
45
     *
46
     * @return void
0 ignored issues
show
Comprehensibility Best Practice introduced by
Adding a @return annotation to constructors is generally not recommended as a constructor does not have a meaningful return value.

Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.

Please refer to the PHP core documentation on constructors.

Loading history...
47
     */
48
    public function __construct(Comment $comment, $message)
49
    {
50
        $this->comment = $comment;
51
        $this->message = $message;
52
    }
53
}
54