Delete   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 8

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 8
dl 0
loc 25
ccs 8
cts 8
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A from() 0 6 1
A getStatement() 0 8 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Sirius\Sql;
5
6
class Delete extends Query
7
{
8
    use Clause\Where;
9
    use Clause\OrderBy;
10
    use Clause\Limit;
11
    use Clause\Returning;
12
13
    protected $table = '';
14
15 1
    public function from(string $table)
16
    {
17 1
        $this->table = $table;
18
19 1
        return $this;
20
    }
21
22 1
    public function getStatement(): string
23
    {
24
        return 'DELETE'
25 1
               . $this->flags->build()
26 1
               . ' FROM ' . $this->table
27 1
               . $this->where->build()
28 1
               . $this->returning->build();
29
    }
30
}
31