| Conditions | 2 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | 7 | public function __toString() |
|
| 39 | { |
||
| 40 | 7 | $message = "Request constraint violations:\n"; |
|
| 41 | 7 | foreach ($this->violations as $violation) { |
|
| 42 | 4 | $message .= sprintf( |
|
| 43 | 4 | "[property]: %s\n[message]: %s\n[constraint]: %s\n[location]: %s\n\n", |
|
| 44 | 4 | $violation->getProperty(), |
|
| 45 | 4 | $violation->getMessage(), |
|
| 46 | 4 | $violation->getConstraint(), |
|
| 47 | 4 | $violation->getLocation() |
|
| 48 | ); |
||
| 49 | } |
||
| 50 | |||
| 51 | 7 | return $message; |
|
| 52 | } |
||
| 54 |