Completed
Push — master ( cb16b1...c87003 )
by Ricardo
04:25 queued 25s
created

createNewServiceMatcher()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
ccs 3
cts 3
cp 1
crap 1
rs 9.4285
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 60
    public function __invoke()
15
    {
16 60
        $configFile = require __DIR__.'/../../../config/config.php';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 8 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
17 60
        $servicesContainer = new ServicesContainer($configFile);
18
19 60
        return $servicesContainer;
20
    }
21
22 60
    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 60
        $factory = new self();
25
26 60
        return $factory();
27
    }
28
}
29