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