Completed
Push — master ( cfed93...a79400 )
by Phecho
03:52
created

AddProjectNamespaceCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 49
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 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\ProjectNamespace;
13
14
final class AddProjectNamespaceCommand
15
{
16
    /**
17
     * The project team name.
18
     *
19
     * @var string
20
     */
21
    public $name;
22
23
    /**
24
     * The project team slug.
25
     *
26
     * @var string
27
     */
28
    public $path;
29
30
    /**
31
     * The project team order.
32
     *
33
     * @var string
34
     */
35
    public $type;
36
37
    /**
38
     * The validation rules.
39
     *
40
     * @var string[]
41
     */
42
    public $rules = [
43
        'name'  => 'required|string',
44
        'path'  => 'required|string',
45
        'type' => 'string',
46
    ];
47
48
    /**
49
     * Create a add project team command instance.
50
     *
51
     * @param string $name
52
     * @param int    $order
0 ignored issues
show
Bug introduced by
There is no parameter named $order. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

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

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

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

Loading history...
53
     *
54
     * @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...
55
     */
56
    public function __construct($name, $path, $type)
57
    {
58
        $this->name = $name;
59
        $this->path = $path;
60
        $this->type = $type;
61
    }
62
}
63