Completed
Push — master ( cb0132...57743c )
by Alexander
02:47
created

MigrationManagerContext::getDatabase()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * This file is part of the SVN-Buddy library.
4
 * For the full copyright and license information, please view
5
 * the LICENSE file that was distributed with this source code.
6
 *
7
 * @copyright Alexander Obuhovich <[email protected]>
8
 * @link      https://github.com/console-helpers/svn-buddy
9
 */
10
11
namespace ConsoleHelpers\SVNBuddy\Database;
12
13
14
use Aura\Sql\ExtendedPdoInterface;
15
use Pimple\Container;
16
17
class MigrationManagerContext
18
{
19
20
	/**
21
	 * Database.
22
	 *
23
	 * @var ExtendedPdoInterface
24
	 */
25
	private $_database;
26
27
	/**
28
	 * Container.
29
	 *
30
	 * @var Container
31
	 */
32
	private $_container;
33
34
	/**
35
	 * Creates migration manager context.
36
	 *
37
	 * @param ExtendedPdoInterface $database Database.
38
	 */
39 9
	public function __construct(ExtendedPdoInterface $database)
40
	{
41 9
		$this->_database = $database;
42 9
	}
43
44
	/**
45
	 * Sets container.
46
	 *
47
	 * @param Container $container Container.
48
	 *
49
	 * @return void
50
	 */
51 7
	public function setContainer(Container $container)
52
	{
53 7
		$this->_container = $container;
54 7
	}
55
56
	/**
57
	 * Returns container.
58
	 *
59
	 * @return Container
60
	 */
61 2
	public function getContainer()
62
	{
63 2
		return $this->_container;
64
	}
65
66
	/**
67
	 * Returns database.
68
	 *
69
	 * @return ExtendedPdoInterface
70
	 */
71 7
	public function getDatabase()
72
	{
73 7
		return $this->_database;
74
	}
75
76
}
77