Completed
Pull Request — develop (#236)
by ANTHONIUS
09:12
created

SearchFormFieldsetFactory::createService()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 5

Duplication

Lines 12
Ratio 100 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
dl 12
loc 12
rs 9.4285
c 1
b 1
f 0
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
7
 * @license       MIT
8
 */
9
10
namespace Cv\Form;
11
12
13
use Zend\ServiceManager\FactoryInterface;
14
use Zend\ServiceManager\ServiceLocatorInterface;
15
16 View Code Duplication
class SearchFormFieldsetFactory 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
    public function createService(ServiceLocatorInterface $serviceLocator)
19
    {
20
        /* @var $serviceLocator \Zend\ServiceManager\AbstractPluginManager */
21
22
        $services = $serviceLocator->getServiceLocator();
23
24
        /* @var \Geo\Options\ModuleOptions $options */
25
        $options = $services->get('Geo/Options');
26
        $fs = new SearchFormFieldset(null, ['location_engine_type' => $options->getPlugin()]);
27
        return $fs;
28
29
    }
30
}