Completed
Pull Request — develop (#89)
by Jaap
02:41
created

CreateCommand   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

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
/**
3
 * phpDocumentor
4
 *
5
 * PHP Version 5.5
6
 *
7
 * @copyright 2010-2015 Mike van Riel / Naenius (http://www.naenius.com)
8
 * @license   http://www.opensource.org/licenses/mit-license.php MIT
9
 * @link      http://phpdoc.org
10
 */
11
12
namespace phpDocumentor\Reflection\Php\Factory\File;
13
14
15
use phpDocumentor\Reflection\File;
16
use phpDocumentor\Reflection\Php\StrategyContainer;
17
18
/**
19
 * File Create command is used by the File Factory Strategy.
20
 * The command is passed to the registered middle ware classes.
21
 */
22
final class CreateCommand
23
{
24
    /**
25
     * @var File
26
     */
27
    private $file;
28
29
    /**
30
     * @var StrategyContainer
31
     */
32
    private $strategies;
33
34
    /**
35
     * Initializes this command.
36
     *
37
     * @param File $file
38
     * @param StrategyContainer $strategies
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
     * @return StrategyContainer
50
     */
51 1
    public function getStrategies()
52
    {
53 1
        return $this->strategies;
54
    }
55
56
    /**
57
     * @return File
58
     */
59 1
    public function getFile()
60
    {
61 1
        return $this->file;
62
    }
63
}
64