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

CreateCommand::getAdapter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
dl 0
loc 4
c 1
b 0
f 1
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
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
    public function __construct(File $file, StrategyContainer $strategies)
41
    {
42
        $this->file = $file;
43
        $this->strategies = $strategies;
44
    }
45
46
    /**
47
     * Returns the strategyContainer in this command context.
48
     *
49
     * @return StrategyContainer
50
     */
51
    public function getStrategies()
52
    {
53
        return $this->strategies;
54
    }
55
56
    /**
57
     * @return File
58
     */
59
    public function getFile()
60
    {
61
        return $this->file;
62
    }
63
}
64