Completed
Push — master ( 353d0e...6c7828 )
by Ron
01:57
created

RunnableDelete::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 3
Ratio 100 %

Importance

Changes 0
Metric Value
dl 3
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
namespace Kir\MySQL\Builder;
3
4
use Kir\MySQL\Builder\Internal\DDLPreparable;
5
use Kir\MySQL\Builder\Internal\DDLRunnable;
6
use Kir\MySQL\Builder\Traits\CreateDDLRunnable;
7
use Kir\MySQL\Databases\MySQL;
8
9 View Code Duplication
class RunnableDelete extends Delete implements DDLPreparable {
10
	use CreateDDLRunnable;
11
	
12
	/**
13
	 * @param MySQL $db
14
	 * @param array $options
15
	 */
16
	public function __construct(MySQL $db, array $options = []) {
0 ignored issues
show
Unused Code introduced by
The parameter $options is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
17
		parent::__construct($db);
18
	}
19
20
	/**
21
	 * @param array $params
22
	 * @return int
23
	 */
24
	public function run(array $params = array()) {
25
		return $this->prepare()->run($params);
26
	}
27
28
	/**
29
	 * @return DDLRunnable
30
	 */
31
	public function prepare() {
32
		return $this->createPreparable($this->db()->prepare($this));
33
	}
34
}
35