| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 30 | public function serve(string $uuid = ''): Response |
||
| 31 | { |
||
| 32 | $headers = [ |
||
| 33 | 'Content-Disposition' => 'Attachment;filename='.$uuid.'.png', |
||
| 34 | 'Content-Type' => 'image/png', |
||
| 35 | ]; |
||
| 36 | |||
| 37 | $skinPath = $this->uuidResolver->resolve($uuid) ? |
||
| 38 | SkinsStorage::getPath($this->uuidResolver->getUuid()) : |
||
|
|
|||
| 39 | SkinsStorage::getPath(MinecraftDefaults::STEVE_DEFAULT_SKIN_NAME); |
||
| 40 | |||
| 41 | $rawSkin = new Raw($skinPath); |
||
| 42 | $rawSkin->render(); |
||
| 43 | |||
| 44 | return $this->responseFactory->make((string) $rawSkin, 200, $headers); |
||
| 45 | } |
||
| 47 |