Completed
Push — develop ( d2080b...f8d06d )
by
unknown
23:14 queued 10:41
created

PreferredJobFieldsetFactory::createService()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 11
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 11
loc 11
rs 9.4285
cc 1
eloc 6
nc 1
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: toni
5
 * Date: 16/06/16
6
 * Time: 0:36
7
 */
8
9
namespace Cv\Factory\Form;
10
11
12
use Cv\Form\PreferredJobFieldset;
13
use Zend\ServiceManager\FactoryInterface;
14
use Zend\ServiceManager\ServiceLocatorInterface;
15
16 View Code Duplication
class PreferredJobFieldsetFactory 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...
17
{
18
    /**
19
     * Creates Preferred Job Form
20
     *
21
     * @param ServiceLocatorInterface $serviceLocator
22
     * @return PreferredJobFieldset
23
     */
24
    public function createService(ServiceLocatorInterface $serviceLocator)
25
    {
26
        /* @var $serviceLocator \Zend\ServiceManager\AbstractPluginManager */
27
28
        $services = $serviceLocator->getServiceLocator();
29
        /* @var \Geo\Options\ModuleOptions $options */
30
        $options = $services->get('Geo/Options');
31
        $fs = new PreferredJobFieldset();
32
        $fs->setLocationEngineType($options->getPlugin());
33
        return $fs;
34
    }
35
36
}