Code Duplication    Length = 15-21 lines in 4 locations

module/Jobs/src/Jobs/Factory/Form/BaseFieldsetFactory.php 1 location

@@ 22-38 (lines=17) @@
19
 *
20
 * @author Carsten Bleek <[email protected]>
21
 */
22
class BaseFieldsetFactory implements FactoryInterface
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

module/Jobs/src/Jobs/Factory/Form/ListFilterLocationFieldsetFactory.php 1 location

@@ 22-37 (lines=16) @@
19
 *
20
 * @author Carsten Bleek <[email protected]>
21
 */
22
class ListFilterLocationFieldsetFactory implements FactoryInterface
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 ListFilterLocationFieldset(['location_engine_type' => $options->getPlugin()]);
35
        return $fs;
36
    }
37
}
38

module/Cv/src/Cv/Factory/Form/PreferredJobFieldsetFactory.php 1 location

@@ 16-36 (lines=21) @@
13
use Zend\ServiceManager\FactoryInterface;
14
use Zend\ServiceManager\ServiceLocatorInterface;
15
16
class PreferredJobFieldsetFactory implements FactoryInterface
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
}

module/Cv/src/Cv/Factory/Form/SearchFormFieldsetFactory.php 1 location

@@ 17-31 (lines=15) @@
14
use Zend\ServiceManager\FactoryInterface;
15
use Zend\ServiceManager\ServiceLocatorInterface;
16
17
class SearchFormFieldsetFactory implements FactoryInterface
18
{
19
    public function createService(ServiceLocatorInterface $serviceLocator)
20
    {
21
        /* @var $serviceLocator \Zend\ServiceManager\AbstractPluginManager */
22
23
        $services = $serviceLocator->getServiceLocator();
24
25
        /* @var \Geo\Options\ModuleOptions $options */
26
        $options = $services->get('Geo/Options');
27
        $fs = new SearchFormFieldset(null, ['location_engine_type' => $options->getPlugin()]);
28
        return $fs;
29
30
    }
31
}