Completed
Branch feature/pre-split (e801ec)
by Anton
03:11
created

TableOperation::getDatabase()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Spiral Framework.
4
 *
5
 * @license   MIT
6
 * @author    Anton Titov (Wolfy-J)
7
 */
8
namespace Spiral\Migrations\Operations;
9
10
use Spiral\Migrations\OperationInterface;
11
12
abstract class TableOperation implements OperationInterface
13
{
14
    /**
15
     * @var string|null
16
     */
17
    protected $database = null;
18
19
    /**
20
     * @var string
21
     */
22
    protected $table;
23
24
    /**
25
     * @param string|null $database
26
     * @param string      $table
27
     */
28
    public function __construct($database, string $table)
29
    {
30
        $this->database = $database;
31
        $this->table = $table;
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function getDatabase()
38
    {
39
        return $this->database;
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45
    public function getTable(): string
46
    {
47
        return $this->table;
48
    }
49
}