- Replaced resource handling with SplFileObject for better readability. - Introduced ImportEmployeesOutput class for structured results. - Updated related services and tests to accommodate new structures.
18 lines
398 B
PHP
18 lines
398 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Cqs\Actions\Employee;
|
|
|
|
use App\Contracts\ActionInput;
|
|
|
|
final readonly class ImportEmployeesInput implements ActionInput
|
|
{
|
|
public function __construct(
|
|
public \SplFileObject $inputStream
|
|
) {
|
|
if (! $inputStream->isReadable()) {
|
|
throw new \InvalidArgumentException('Input stream must be readable.');
|
|
}
|
|
}
|
|
}
|