Upload beautify

This commit is contained in:
2026-02-14 15:14:12 +01:00
parent e129618910
commit 79192345e3
249 changed files with 24436 additions and 1021 deletions

View File

@@ -0,0 +1,42 @@
<?php
declare(strict_types=1);
namespace App\Uploads\Exceptions;
use RuntimeException;
final class DraftQuotaException extends RuntimeException
{
public function __construct(
private readonly string $machineCode,
private readonly int $httpStatus,
) {
parent::__construct($machineCode);
}
public function machineCode(): string
{
return $this->machineCode;
}
public function httpStatus(): int
{
return $this->httpStatus;
}
public static function draftLimit(): self
{
return new self('draft_limit', 429);
}
public static function storageLimit(): self
{
return new self('storage_limit', 413);
}
public static function duplicateUpload(): self
{
return new self('duplicate_upload', 422);
}
}

View File

@@ -0,0 +1,11 @@
<?php
declare(strict_types=1);
namespace App\Uploads\Exceptions;
use RuntimeException;
final class UploadNotFoundException extends RuntimeException
{
}

View File

@@ -0,0 +1,11 @@
<?php
declare(strict_types=1);
namespace App\Uploads\Exceptions;
use RuntimeException;
final class UploadOwnershipException extends RuntimeException
{
}

View File

@@ -0,0 +1,11 @@
<?php
declare(strict_types=1);
namespace App\Uploads\Exceptions;
use RuntimeException;
final class UploadPublishValidationException extends RuntimeException
{
}