Completed
Pull Request — develop (#241)
by ANTHONIUS
08:03
created

ConnectionOptionFactory   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 2
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 8 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
6
 * @license   MIT
7
 */
8
9
namespace Solr\Factory;
10
11
12
use Solr\Options\Connection;
13
use Zend\ServiceManager\FactoryInterface;
14
use Zend\ServiceManager\ServiceLocatorInterface;
15
16
class ConnectionOptionFactory implements FactoryInterface
17
{
18
    public function createService(ServiceLocatorInterface $serviceLocator)
19
    {
20
        $config = $serviceLocator->get('Configuration');
21
22
        $service = new Connection($config['solr']['connection']);
23
24
        return $service;
25
    }
26
27
}