InviteGroupMemberCommand::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
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\User;
13
14
final class InviteGroupMemberCommand
15
{
16
    /**
17
     * The invte emails.
18
     *
19
     * @var string
20
     */
21
    public $emails;
22
23
    /**
24
     * The validation rules.
25
     *
26
     * @var string[]
27
     */
28
    public $rules = [
29
        'emails' => 'required|array|email',
30
    ];
31
32
    /**
33
     * Create a new invite group member command instance.
34
     *
35
     * @param array $email
0 ignored issues
show
Documentation introduced by
There is no parameter named $email. Did you maybe mean $emails?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.

Consider the following example. The parameter $ireland is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $ireland
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was changed, but the annotation was not.

Loading history...
36
     */
37
    public function __construct($emails)
38
    {
39
        $this->emails = $emails;
40
    }
41
}
42