ContributorsControllerFactory   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createService() 0 4 1
1
<?php
2
3
/**
4
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
5
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
6
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
8
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
9
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
10
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
11
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
12
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
13
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
14
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
15
 *
16
 * This software consists of voluntary contributions made by many individuals
17
 * and is licensed under the MIT license.
18
 */
19
namespace Application\Factory\Controller;
20
21
use Application\Controller\ContributorsController;
22
use Zend\ServiceManager\FactoryInterface;
23
use Zend\ServiceManager\ServiceLocatorInterface;
24
25
class ContributorsControllerFactory implements FactoryInterface
26
{
27
    /**
28
     * {@inheritdoc}
29
     */
30
    public function createService(ServiceLocatorInterface $serviceLocator)
31
    {
32
        return new ContributorsController(unserialize(file_get_contents('./data/contributors/contributors.pson')));
33
    }
34
}
35