Rename folders to match PHP PSR-4 autoloading conventions: - schemas → Schemas - shared → Shared - Wordpress → WordPress (in all locations) Fixes deployment issues on Linux servers where filesystem is case-sensitive. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
53 lines
1.1 KiB
PHP
53 lines
1.1 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace ROITheme\Shared\Application\UseCases\DeleteComponent;
|
|
|
|
/**
|
|
* DeleteComponentResponse - DTO de respuesta para eliminación
|
|
*
|
|
* @package ROITheme\Shared\Application\UseCases\DeleteComponent
|
|
*/
|
|
final readonly class DeleteComponentResponse
|
|
{
|
|
private function __construct(
|
|
private bool $success,
|
|
private ?string $message,
|
|
private ?string $error
|
|
) {}
|
|
|
|
public function isSuccess(): bool
|
|
{
|
|
return $this->success;
|
|
}
|
|
|
|
public function getMessage(): ?string
|
|
{
|
|
return $this->message;
|
|
}
|
|
|
|
public function getError(): ?string
|
|
{
|
|
return $this->error;
|
|
}
|
|
|
|
public static function success(string $message): self
|
|
{
|
|
return new self(true, $message, null);
|
|
}
|
|
|
|
public static function failure(string $error): self
|
|
{
|
|
return new self(false, null, $error);
|
|
}
|
|
|
|
public function toArray(): array
|
|
{
|
|
return [
|
|
'success' => $this->success,
|
|
'message' => $this->message,
|
|
'error' => $this->error
|
|
];
|
|
}
|
|
}
|