for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Minepic\Http\Controllers\Api;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class AvatarController extends BaseApiController
{
/**
* Serve Avatar.
*
* @param \Illuminate\Http\Request
* @param string $uuid
* @param int $size
* @throws \Throwable
* @return \Illuminate\Http\Response
*/
public function serveUuid(Request $request, string $uuid, $size = 0): Response
$this->uuidResolver->resolve($uuid);
$this->dispatchAccountImageServedEvent();
return $this->pngResponse(
(string) $this->rendering->avatar(
$this->uuidResolver->getUuid(),
(int) $size
)
);
}
* @throws \Minepic\Image\Exceptions\ImageCreateFromPngFailedException
* @throws \Minepic\Image\Exceptions\ImageTrueColorCreationFailedException
* @throws \Minepic\Image\Exceptions\InvalidSectionSpecifiedException
* @return Response
public function serveDefault($size = 0): Response
null,