Completed
Push — master ( ffbb02...68e5b2 )
by smiley
02:42
created

FirebirdBindValuesTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 28
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A bindValues() 0 9 2
1
<?php
2
/**
3
 *
4
 * @filesource   FirebirdBindValuesTrait.php
5
 * @created      12.06.2017
6
 * @package      chillerlan\Database\Query\Dialects\Firebird
7
 * @author       Smiley <[email protected]>
8
 * @copyright    2017 Smiley
9
 * @license      MIT
10
 */
11
12
namespace chillerlan\Database\Query\Dialects\Firebird;
13
14
/**
15
 * Trait FirebirdBindValuesTrait
16
 */
17
trait FirebirdBindValuesTrait{
18
19
	/**
20
	 * @var int
21
	 */
22
	protected $offset;
23
24
	/**
25
	 * @var int
26
	 */
27
	protected $limit;
28
29
	/**
30
	 * @var array
31
	 */
32
	protected $bindValues = [];
33
34
	public function bindValues():array{
35
36
		if($this->limit){
37
			array_unshift($this->bindValues, $this->offset ?? 0);
38
			array_unshift($this->bindValues, $this->limit);
39
		}
40
41
		return $this->bindValues;
42
	}
43
44
}
45