Conditions | 6 |
Paths | 8 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 13 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
34 | 1 | public function toSql() |
|
35 | { |
||
36 | 1 | $sql = "DROP TABLE"; |
|
37 | 1 | if (isset($this->attributes['if_exists'])) { |
|
38 | 1 | $sql .= ' IF EXISTS'; |
|
39 | 1 | } |
|
40 | 1 | $sql .= " `{$this->table}`"; |
|
41 | 1 | if (isset($this->attributes['restrict']) && $this->attributes['restrict']) { |
|
42 | 1 | $sql .= ' RESTRICT'; |
|
43 | 1 | } |
|
44 | 1 | if (isset($this->attributes['cascade']) && $this->attributes['cascade']) { |
|
45 | 1 | $sql .= ' CASCADE'; |
|
46 | 1 | } |
|
47 | 1 | return $sql; |
|
48 | } |
||
49 | |||
58 |