Completed
Pull Request — master (#18)
by Ricardo
05:45
created

ServicesContainerFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 17
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __invoke() 0 7 1
A createNewServiceMatcher() 0 6 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Ricardo Fiorani
5
 * Date: 31/08/2015
6
 * Time: 21:07.
7
 */
8
namespace RicardoFiorani\Container\Factory;
9
10
use RicardoFiorani\Container\ServicesContainer;
11
12
class ServicesContainerFactory
13
{
14
    public function __invoke()
15
    {
16
        $configFile = require __DIR__.'/../../../config/config.php';
17
        $servicesContainer = new ServicesContainer($configFile);
18
19
        return $servicesContainer;
20
    }
21
22
    public static function createNewServiceMatcher()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
23
    {
24
        $factory = new self();
25
26
        return $factory();
27
    }
28
}
29