CreateCommand   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 34
rs 10
c 0
b 0
f 0
ccs 8
cts 8
cp 1
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getStrategies() 0 4 1
A getFile() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
/**
5
 * This file is part of phpDocumentor.
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @copyright 2010-2018 Mike van Riel / Naenius (http://www.naenius.com)
11
 * @license   http://www.opensource.org/licenses/mit-license.php MIT
12
 * @link      http://phpdoc.org
13
 */
14
15
namespace phpDocumentor\Reflection\Php\Factory\File;
16
17
use phpDocumentor\Reflection\File;
18
use phpDocumentor\Reflection\Middleware\Command;
19
use phpDocumentor\Reflection\Php\StrategyContainer;
20
21
/**
22
 * File Create command is used by the File Factory Strategy.
23
 * The command is passed to the registered middle ware classes.
24
 */
25
final class CreateCommand implements Command
26
{
27
    /**
28
     * @var File
29
     */
30
    private $file;
31
32
    /**
33
     * @var StrategyContainer
34
     */
35
    private $strategies;
36
37
    /**
38
     * Initializes this command.
39
     */
40 2
    public function __construct(File $file, StrategyContainer $strategies)
41
    {
42 2
        $this->file = $file;
43 2
        $this->strategies = $strategies;
44 2
    }
45
46
    /**
47
     * Returns the strategyContainer in this command context.
48
     */
49 1
    public function getStrategies(): StrategyContainer
50
    {
51 1
        return $this->strategies;
52
    }
53
54 1
    public function getFile(): File
55
    {
56 1
        return $this->file;
57
    }
58
}
59