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

TableCommand   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 25
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getDriver() 0 4 1
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
}