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

Select   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 16
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __toString() 0 7 1
A getValues() 0 5 1
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