Delete   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1
Metric Value
wmc 5
lcom 1
cbo 1
dl 0
loc 45
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 2
A partName() 0 4 1
A getLimitStart() 0 4 1
A limit() 0 6 1
1
<?php
2
/**
3
 * Author: Nil Portugués Calderó <[email protected]>
4
 * Date: 6/3/14
5
 * Time: 12:07 AM.
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace NilPortugues\Sql\QueryBuilder\Manipulation;
12
13
/**
14
 * Class Delete.
15
 */
16
class Delete extends AbstractBaseQuery
17
{
18
    /**
19
     * @var int
20
     */
21
    protected $limitStart;
22
23
    /**
24
     * @param string $table
25
     */
26
    public function __construct($table = null)
27
    {
28
        if (isset($table)) {
29
            $this->setTable($table);
30
        }
31
    }
32
33
    /**
34
     * @return string
35
     */
36
    public function partName()
37
    {
38
        return 'DELETE';
39
    }
40
41
    /**
42
     * @return int
43
     */
44
    public function getLimitStart()
45
    {
46
        return $this->limitStart;
47
    }
48
49
    /**
50
     * @param int $start
51
     *
52
     * @return $this
53
     */
54
    public function limit($start)
55
    {
56
        $this->limitStart = $start;
57
58
        return $this;
59
    }
60
}
61