Completed
Push — develop ( 09456b...2094a2 )
by Mathias
14s queued 10s
created

FileControllerFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __invoke() 7 7 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @license MIT
7
 * @copyright  2013 - 2017 Cross Solution <http://cross-solution.de>
8
 */
9
10
namespace Core\Factory\Controller;
11
use Core\Controller\FileController;
12
use Interop\Container\ContainerInterface;
13
use Zend\ServiceManager\Factory\FactoryInterface;
14
15
/**
16
 * Creates new FileController object
17
 *
18
 * @package Core\Factory\Controller
19
 * @author Anthonius Munthi <[email protected]>
20
 * @since 0.30
21
 */
22 View Code Duplication
class FileControllerFactory implements FactoryInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
23
{
24
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
25
    {
26
        $repositories = $container->get('repositories');
27
        $coreFileEvents = $container->get('Core/File/Events');
28
29
        return new FileController($repositories,$coreFileEvents);
30
    }
31
}
32