FactoryDefinition::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * This file is part of the Container package.
5
 *
6
 * Copyright (c) Miloš Đurić <[email protected]>
7
 *
8
 * For full copyright and license information, please refer to the LICENSE file,
9
 * located at the package root folder.
10
 */
11
12
namespace Laganica\Di\Definition;
13
14
/**
15
 * Class FactoryDefinition
16
 *
17
 * @package Laganica\Di\Definition
18
 */
19
class FactoryDefinition implements DefinitionInterface
20
{
21
    /**
22
     * @var string
23
     */
24
    private $factoryClass;
25
26
    /**
27
     * @param string $factoryClass
28
     */
29 5
    public function __construct(string $factoryClass)
30
    {
31 5
        $this->factoryClass = $factoryClass;
32 5
    }
33
34
    /**
35
     * @return string
36
     */
37 5
    public function getFactoryClass(): string
38
    {
39 5
        return $this->factoryClass;
40
    }
41
}
42