refactor: reorganise Service/ into Provider/ and Renderer/ sub-namespaces
Move all provider-related classes, enums, interface and trait into App\Service\Provider; move SvgRenderer into App\Service\Renderer. ContributionAggregator stays at the Service root as the orchestrator. Test namespaces and use statements updated to match. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Service\Provider;
|
||||
|
||||
final class ProviderStatus
|
||||
{
|
||||
public function __construct(
|
||||
public readonly string $name,
|
||||
public readonly ProviderStatusType $status,
|
||||
public readonly ?ProviderErrorCode $error = null,
|
||||
public readonly ?string $message = null,
|
||||
) {}
|
||||
|
||||
/** @return array<string, string> */
|
||||
public function toArray(): array
|
||||
{
|
||||
$data = ['status' => $this->status->value];
|
||||
if ($this->error !== null) {
|
||||
$data['error'] = $this->error->value;
|
||||
}
|
||||
if ($this->message !== null) {
|
||||
$data['message'] = $this->message;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user