fix(structure): Correct case-sensitivity for Linux compatibility
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>
This commit is contained in:
69
Shared/Domain/Exceptions/ComponentNotFoundException.php
Normal file
69
Shared/Domain/Exceptions/ComponentNotFoundException.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace ROITheme\Shared\Domain\Exceptions;
|
||||
|
||||
/**
|
||||
* ComponentNotFoundException - Excepción de Dominio para componente no encontrado
|
||||
*
|
||||
* RESPONSABILIDAD: Representar errores cuando un componente solicitado no existe
|
||||
*
|
||||
* CUÁNDO LANZAR:
|
||||
* - Búsqueda de componente por nombre que no existe en el repositorio
|
||||
* - Intento de actualizar/eliminar componente inexistente
|
||||
* - Referencia a componente que fue eliminado
|
||||
*
|
||||
* USO:
|
||||
* ```php
|
||||
* $component = $repository->findByName($name);
|
||||
*
|
||||
* if ($component === null) {
|
||||
* throw ComponentNotFoundException::withName($name);
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @package ROITheme\Shared\Domain\Exceptions
|
||||
*/
|
||||
class ComponentNotFoundException extends \RuntimeException
|
||||
{
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param string $message Mensaje de error
|
||||
* @param int $code Código de error (opcional)
|
||||
* @param \Throwable|null $previous Excepción anterior (opcional)
|
||||
*/
|
||||
public function __construct(
|
||||
string $message,
|
||||
int $code = 0,
|
||||
?\Throwable $previous = null
|
||||
) {
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
|
||||
/**
|
||||
* Crear excepción para componente no encontrado por nombre
|
||||
*
|
||||
* @param string $componentName
|
||||
* @return self
|
||||
*/
|
||||
public static function withName(string $componentName): self
|
||||
{
|
||||
return new self(
|
||||
sprintf('Component "%s" not found', $componentName)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Crear excepción para componente no encontrado por ID
|
||||
*
|
||||
* @param int $componentId
|
||||
* @return self
|
||||
*/
|
||||
public static function withId(int $componentId): self
|
||||
{
|
||||
return new self(
|
||||
sprintf('Component with ID %d not found', $componentId)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user