UpdateCommentCommand::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 1
Metric Value
c 3
b 0
f 1
dl 0
loc 5
rs 9.4286
cc 1
eloc 3
nc 1
nop 2
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
    public function __construct(Comment $comment, $message)
47
    {
48
        $this->comment = $comment;
49
        $this->message = $message;
50
    }
51
}
52