Passed
Branch release (bd7374)
by Henry
03:48
created

AbstractQuery::setTableAlias()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
1
<?php
2
3
namespace Divergence\IO\Database\Query;
4
5
abstract class AbstractQuery
6
{
7
    public string $table;
8
    public string $tableAlias;
9
10
    /** @return static */
11 81
    public function setTable(string $table): AbstractQuery
12
    {
13 81
        $this->table = $table;
14 81
        return $this;
15
    }
16
17
    /** @return static */
18 17
    public function setTableAlias(string $alias): AbstractQuery
19
    {
20 17
        $this->tableAlias = $alias;
21 17
        return $this;
22
    }
23
24
    abstract public function __toString(): string;
25
}
26