Completed
Push — master ( 415647...d02380 )
by Ricardo
02:50
created

createNewServiceMatcher()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
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';
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
        $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
}
0 ignored issues
show
Coding Style introduced by
As per coding style, files should not end with a newline character.

This check marks files that end in a newline character, i.e. an empy line.

Loading history...
29