Completed
Push — master ( 12cab7...06984a )
by Alexander
31s queued 27s
created

MigrationContext::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
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\Repository\RevisionLog;
12
13
14
use Aura\Sql\ExtendedPdoInterface;
15
use ConsoleHelpers\DatabaseMigration\MigrationContext as BaseMigrationContext;
16
17
class MigrationContext extends BaseMigrationContext
18
{
19
20
	/**
21
	 * Revision log.
22
	 *
23
	 * @var RevisionLog
24
	 */
25
	private $_revisionLog;
26
27
	/**
28
	 * Creates migration manager context.
29
	 *
30
	 * @param ExtendedPdoInterface $database     Database.
31
	 * @param RevisionLog          $revision_log Revision log.
32
	 */
33 1
	public function __construct(ExtendedPdoInterface $database, RevisionLog $revision_log)
34
	{
35 1
		parent::__construct($database);
36
37 1
		$this->_revisionLog = $revision_log;
38 1
	}
39
40
	/**
41
	 * Returns revision log.
42
	 *
43
	 * @return RevisionLog
44
	 */
45
	public function getRevisionLog()
46
	{
47
		return $this->_revisionLog;
48
	}
49
50
}
51