<?php

declare(strict_types=1);

namespace App\Framework\Deployment\Pipeline\Configuration;

use App\Framework\Exception\FrameworkException;

/**
 * Pipeline Configuration Exception
 *
 * Thrown when pipeline configuration loading or validation fails.
 */
final class PipelineConfigurationException extends FrameworkException
{
    public static function fileNotFound(string $filePath): self
    {
        return new self("Pipeline configuration file not found: {$filePath}");
    }

    public static function invalidYaml(string $message): self
    {
        return new self("Invalid YAML configuration: {$message}");
    }

    public static function missingRequiredField(string $field): self
    {
        return new self("Required configuration field missing: {$field}");
    }

    public static function invalidEnvironment(string $environment): self
    {
        return new self("Invalid deployment environment: {$environment}");
    }

    public static function invalidStageType(string $stageType): self
    {
        return new self("Invalid pipeline stage type: {$stageType}");
    }
}
