Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
34 | 17 | public function toString() |
|
35 | { |
||
36 | 17 | if(empty($this->tables)) |
|
37 | 17 | { |
|
38 | 3 | return ''; |
|
39 | } |
||
40 | |||
41 | 14 | $tables = array(); |
|
42 | |||
43 | 14 | foreach($this->tables as $table) |
|
44 | { |
||
45 | 14 | $tables[] = $table->toString(); |
|
46 | 14 | } |
|
47 | |||
48 | 14 | $tablesString = implode(', ', array_filter($tables)); |
|
49 | |||
50 | 14 | return sprintf('UPDATE %s', $tablesString); |
|
51 | } |
||
52 | |||
66 |