| Conditions | 3 |
| Paths | 4 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function reverse($result) |
||
| 31 | { |
||
| 32 | $attributes = []; |
||
| 33 | foreach ($this->getTransformers() as $property => $transformer) { |
||
| 34 | $attributes[$transformer->getName()] = $result->$property; |
||
| 35 | } |
||
| 36 | |||
| 37 | $keyVals = []; |
||
| 38 | foreach ($attributes as $name => $attribute) { |
||
| 39 | $keyVals[] = sprintf('%s=%s', $name, $attribute); |
||
| 40 | } |
||
| 41 | |||
| 42 | return implode(',', $keyVals); |
||
| 43 | } |
||
| 44 | |||
| 49 |