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

RemoveProjectNamespaceCommand   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
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 21
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 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
use Gitamin\Models\ProjectNamespace;
15
16
final class RemoveProjectNamespaceCommand
17
{
18
    /**
19
     * The project team to remove.
20
     *
21
     * @var \Gitamin\Models\ProjectTeam
22
     */
23
    public $namespace;
24
25
    /**
26
     * Create a new remove project team command instance.
27
     *
28
     * @param \Gitamin\Models\ProjectTeam $team
0 ignored issues
show
Bug introduced by
There is no parameter named $team. 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...
29
     *
30
     * @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...
31
     */
32
    public function __construct(ProjectNamespace $namespace)
33
    {
34
        $this->namespace = $namespace;
0 ignored issues
show
Documentation Bug introduced by
It seems like $namespace of type object<Gitamin\Models\ProjectNamespace> is incompatible with the declared type object<Gitamin\Models\ProjectTeam> of property $namespace.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
35
    }
36
}
37