Completed
Pull Request — develop (#462)
by ANTHONIUS
09:40
created

ProfileControllerFactory::__invoke()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 12
Ratio 100 %

Importance

Changes 0
Metric Value
dl 12
loc 12
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 3
1
<?php
2
3
/**
4
 * YAWIK
5
 *
6
 * @filesource
7
 * @license MIT
8
 * @copyright  2013 - 2017 Cross Solution <http://cross-solution.de>
9
 */
10
11
namespace Organizations\Factory\Controller;
12
use Interop\Container\ContainerInterface;
13
use Organizations\Controller\ProfileController;
14
use Zend\ServiceManager\Factory\FactoryInterface;
15
16
/**
17
 * Create new ProfileController object
18
 *
19
 * @author Anthonius Munthi <[email protected]>
20
 * @package Organizations\Factory\Controller
21
 * @since 0.30
22
 */
23 View Code Duplication
class ProfileControllerFactory 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...
24
{
25
    public function __invoke(ContainerInterface $container, $requestedName, array $options = null)
26
    {
27
        $repo = $container->get('repositories')
28
            ->get('Organizations/Organization')
29
        ;
30
        $jobRepository = $container->get('repositories')
31
            ->get('Jobs/Job')
32
        ;
33
        $translator = $container->get('translator');
34
        $imageFileCacheManager = $container->get('Organizations\ImageFileCache\Manager');
35
        return new ProfileController($repo,$jobRepository,$translator,$imageFileCacheManager);
36
    }
37
}
38