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