These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
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
|
|||
47 | */ |
||
48 | public function __construct(Comment $comment, $message) |
||
49 | { |
||
50 | $this->comment = $comment; |
||
51 | $this->message = $message; |
||
52 | } |
||
53 | } |
||
54 |
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.