Completed
Push — 1.x ( 6e286e...c7aa89 )
by Daniel
45:22 queued 35:25
created

RedirectCallback   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 13 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Clayton Daley
5
 * Date: 5/6/2015
6
 * Time: 6:37 PM
7
 */
8
9
namespace ZfcUser\Factory\Controller;
10
11
12
use Zend\ServiceManager\FactoryInterface;
13
use Zend\ServiceManager\ServiceLocatorInterface;
14
15
class RedirectCallback implements FactoryInterface
16
{
17
    /**
18
     * Create service
19
     *
20
     * @param ServiceLocatorInterface $serviceLocator
21
     * @return mixed
22
     */
23
    public function createService(ServiceLocatorInterface $serviceLocator)
24
    {
25
        /* @var RouteInterface $router */
26
        $router = $serviceLocator->get('Router');
27
28
        /* @var Application $application */
29
        $application = $serviceLocator->get('Application');
30
31
        /* @var ModuleOptions $options */
32
        $options = $serviceLocator->get('zfcuser_module_options');
33
34
        return new RedirectCallback($application, $router, $options);
0 ignored issues
show
Unused Code introduced by
The call to RedirectCallback::__construct() has too many arguments starting with $application.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
35
    }
36
}
37