Completed
Push — master ( 5a832a...3b5c12 )
by Jared
02:26
created

From::from()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace JAQB\Query\Traits;
4
5
trait From
6
{
7
    /**
8
     * @var 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 FromStatement
30
     */
31
    public function getFrom()
32
    {
33
        return $this->from;
34
    }
35
}
36