| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 14 | 
| Code Lines | 9 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 10 | 
| CRAP Score | 2 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 27 | 6 | public function __toString() | |
| 28 |     { | ||
| 29 | 6 | $message = "Request constraint violations:\n"; | |
| 30 | 6 |         foreach ($this->violations as $violation) { | |
| 31 | 3 | $message .= sprintf( | |
| 32 | 3 | "[property]: %s\n[message]: %s\n[constraint]: %s\n[location]: %s\n\n", | |
| 33 | 3 | $violation->getProperty(), | |
| 34 | 3 | $violation->getMessage(), | |
| 35 | 3 | $violation->getConstraint(), | |
| 36 | 3 | $violation->getLocation() | |
| 37 | ); | ||
| 38 | } | ||
| 39 | |||
| 40 | 6 | return $message; | |
| 41 | } | ||
| 43 |