| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | 15 | public function toString(): string |
|
| 37 | { |
||
| 38 | 15 | if(empty($this->tables)) |
|
| 39 | { |
||
| 40 | 3 | return ''; |
|
| 41 | } |
||
| 42 | |||
| 43 | 12 | $tables = array(); |
|
| 44 | |||
| 45 | 12 | foreach($this->tables as $table) |
|
| 46 | { |
||
| 47 | 12 | $tables[] = $table->toString(); |
|
| 48 | } |
||
| 49 | |||
| 50 | 12 | $tablesString = implode(', ', array_filter($tables)); |
|
| 51 | |||
| 52 | 12 | return sprintf('UPDATE %s', $tablesString); |
|
| 53 | } |
||
| 54 | } |
||
| 55 |
The PSR-2 coding standard requires that all properties in a class have their visibility explicitly declared. If you declare a property using
the property is implicitly global.
To learn more about the PSR-2, please see the PHP-FIG site on the PSR-2.