Completed
Pull Request — develop (#274)
by
unknown
39:07
created

Manager   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getLists() 0 4 1
A removeItems() 0 4 1
1
<?php
2
/**
3
 * @filesource
4
 * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
5
 * @license MIT
6
 * @author Miroslav Fedeleš <[email protected]>
7
 * @since 0.27
8
 */
9
namespace Auth\Dependency;
10
11
use Zend\EventManager\EventManagerAwareTrait;
12
use Auth\Entity\UserInterface as User;
13
use Zend\Mvc\Router\RouteInterface as Router;
14
15
class Manager
16
{
17
    use EventManagerAwareTrait;
18
    
19
    const EVENT_GET_LISTS = 'getLists';
20
    const EVENT_REMOVE_ITEMS = 'removeItems';
21
22
    /**
23
     * @param User $user
0 ignored issues
show
Bug introduced by
There is no parameter named $user. 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...
24
     * @param Router $router
0 ignored issues
show
Bug introduced by
There is no parameter named $router. 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...
25
     * @return ListInterface[]
0 ignored issues
show
Documentation introduced by
Should the return type not be \Zend\EventManager\ResponseCollection?

This check compares the return type specified in the @return annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.

Loading history...
26
     */
27
    public function getLists()
28
    {
29
        return $this->getEventManager()->trigger(static::EVENT_GET_LISTS, $this);
30
    }
31
 
32
    /**
33
     * @param User $user
34
     * @param Router $router
0 ignored issues
show
Bug introduced by
There is no parameter named $router. 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...
35
     * @return \Zend\EventManager\ResponseCollection
36
     */
37
    public function removeItems(User $user)
38
    {
39
        return $this->getEventManager()->trigger(static::EVENT_REMOVE_ITEMS, $this, compact('user'));
40
    }
41
}
42