Files
Toiminnanohjaus/app/Modules/Catalog/Domain/Exceptions/InvalidWorkflowStepMaterial.php

20 lines
566 B
PHP

<?php
declare(strict_types=1);
namespace App\Modules\Catalog\Domain\Exceptions;
use App\Modules\Shared\Domain\Exceptions\DomainException;
/**
* A step's default material has no item or no valid quantity. $stepIndex
* and $materialIndex count from 0 when known.
*/
final class InvalidWorkflowStepMaterial extends DomainException
{
public function __construct(public readonly ?int $stepIndex = null, public readonly ?int $materialIndex = null)
{
parent::__construct('A default material needs an item and a quantity greater than zero.');
}
}