| Conditions | 1 |
| Paths | 1 |
| Total Lines | 21 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function format($target) |
||
| 15 | { |
||
| 16 | $event = $target->getEvent(); |
||
| 17 | |||
| 18 | $formattedParameters = array_map(function($value) { |
||
| 19 | return ' ' . $this->aggregate->format($value); |
||
| 20 | }, $event->getAll()); |
||
| 21 | |||
| 22 | array_unshift($formattedParameters, '['); |
||
| 23 | array_push($formattedParameters, ']'); |
||
| 24 | $parametersDescription = implode(PHP_EOL, $formattedParameters); |
||
| 25 | |||
| 26 | $eventClass = current(array_reverse(explode('\\', get_class($event)))); |
||
| 27 | |||
| 28 | return strtr(':jobName :jobGroup of type :eventClass with parameters :parametersDescription', [ |
||
| 29 | ':jobName' => $target->getName(), |
||
| 30 | ':jobGroup' => (string) $target, |
||
| 31 | ':eventClass' => $eventClass, |
||
| 32 | ':parametersDescription' => $parametersDescription |
||
| 33 | ]); |
||
| 34 | } |
||
| 35 | |||
| 43 | } |