| Conditions | 3 | 
| Paths | 3 | 
| Total Lines | 17 | 
| Code Lines | 8 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 8 | 
| CRAP Score | 3 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 34 | 7 | public function toString(): string | |
| 35 |     { | ||
| 36 | 7 | if(empty($this->sets)) | |
| 37 |         { | ||
| 38 | 1 | return ''; | |
| 39 | } | ||
| 40 | |||
| 41 | 6 | $sets = array(); | |
| 42 | 6 | foreach($this->sets as $columnName => $value) | |
| 43 |         { | ||
| 44 | 6 | $type = $this->guessType($columnName, $value); | |
| 45 | |||
| 46 | 6 | $sets[] = (new Conditions\Equal($type, $value))->toString($this->escaper); | |
| 47 | } | ||
| 48 | |||
| 49 | 6 |         return sprintf('SET %s', implode(', ', $sets)); | |
| 50 | } | ||
| 51 | } | ||
| 52 | 
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.