Completed
Branch feature/pre-split (745f0c)
by Anton
03:28
created

TableCommand::getDriver()   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
 * components
4
 *
5
 * @author    Wolfy-J
6
 */
7
namespace Spiral\ORM\Commands;
8
9
use Spiral\Database\Entities\Driver;
10
use Spiral\Database\Entities\Table;
11
use Spiral\ORM\SQLCommandInterface;
12
13
class TableCommand extends AbstractCommand implements SQLCommandInterface
14
{
15
    /**
16
     * Table to be updated.
17
     *
18
     * @var Table
19
     */
20
    protected $table;
21
22
    /**
23
     * @param Table $table
24
     */
25
    public function __construct(Table $table)
26
    {
27
        $this->table = $table;
28
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33
    public function getDriver(): Driver
34
    {
35
        return $this->table->getDatabase()->getDriver();
36
    }
37
}