Passed
Branch master (23c1c2)
by Wanderson
03:02
created

Select::getValues()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 5
rs 10
1
<?php
2
3
namespace Win\Repositories\Database\Sql\Builders;
4
5
use Win\Repositories\Database\Sql\Builder;
6
7
/**
8
 * SELECT * FROM ...
9
 */
10
class Select extends Builder
11
{
12
	public function __toString()
13
	{
14
		return ($this->query->raw ??
15
			'SELECT * FROM ' . $this->query->table)
16
			. $this->query->where
17
			. $this->query->orderBy
18
			. $this->query->limit;
19
	}
20
21
	public function getValues()
22
	{
23
		return array_merge(
24
			$this->query->values,
25
			$this->query->where->values
26
		);
27
	}
28
}
29