ServicesContainerFactory::__invoke()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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