From::from()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
3
namespace JAQB\Query\Traits;
4
5
trait From
6
{
7
    /**
8
     * @var \JAQB\Statement\FromStatement
9
     */
10
    protected $from;
11
12
    /**
13
     * Sets the table for the query.
14
     *
15
     * @param string $table table name
16
     *
17
     * @return self
18
     */
19
    public function from($table)
20
    {
21
        $this->from->addTable($table);
22
23
        return $this;
24
    }
25
26
    /**
27
     * Gets the from statement for the query.
28
     *
29
     * @return \JAQB\Statement\FromStatement
30
     */
31
    public function getFrom()
32
    {
33
        return $this->from;
34
    }
35
}
36