<?php

declare(strict_types=1);

namespace Apexl\Io\Collections;

use Apexl\Io\System\Commands\DaedalusCommand;
use Arrayy\Collection\AbstractCollection;

class DaedalusCommandCollection extends AbstractCollection
{
    /**
     * @param class-string<DaedalusCommand> $value
     * @param $key
     * @return DaedalusCommandCollection
     */
    public function add($value, $key = null): DaedalusCommandCollection
    {
        \Apexl\Io\assertInstanceOf($value, DaedalusCommand::class);

        return parent::add($value, $key);
    }

    public function getType(): string
    {
        return 'string';
    }
}
