Completed
Push — develop ( afe0ec...7c3dfe )
by
unknown
21:46 queued 13:34
created

BaseFieldsetFactory::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 1
Metric Value
c 1
b 0
f 1
dl 11
loc 11
rs 9.4285
cc 1
eloc 6
nc 1
nop 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @license MIT
7
 * @copyright  2013 - 2015 Cross Solution <http://cross-solution.de>
8
 */
9
  
10
/** */
11
namespace Jobs\Factory\Form;
12
13
use Jobs\Form\BaseFieldset;
14
use Zend\ServiceManager\FactoryInterface;
15
use Zend\ServiceManager\ServiceLocatorInterface;
16
17
/**
18
 * Factory for the BaseFieldset (Job Title and Location)
19
 *
20
 * @author Carsten Bleek <[email protected]>
21
 */
22 View Code Duplication
class BaseFieldsetFactory 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
    /**
25
     * Creates the multiposting select box.
26
     */
27
    public function createService(ServiceLocatorInterface $serviceLocator)
28
    {
29
        /* @var $serviceLocator \Zend\ServiceManager\AbstractPluginManager */
30
31
        $services = $serviceLocator->getServiceLocator();
32
        /* @var \Geo\Options\ModuleOptions $options */
33
        $options = $services->get('Geo/Options');
34
        $fs = new BaseFieldset();
35
        $fs->setLocationEngineType($options->getPlugin());
36
        return $fs;
37
    }
38
}
39