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

FirebirdBindValuesTrait::bindValues()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
c 0
b 0
f 0
rs 9.6666
cc 2
eloc 5
nc 2
nop 0
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