/
v.bolshakov
/
AIEcosystem-Testing
Обзор
Документация
Войти
/
v.bolshakov
/
AIEcosystem-Testing
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
common/shell/Commands/Collections/SubCommands.php
32 строки
548 B
Developer
Initial commit
03 авг 2026, 17:43
03 авг 2026, 17:43
7433917
Код
Авторство
О чём код?
<?php declare(strict_types=1); namespace common\shell\Commands\Collections; use common\shell\Commands\SubCommand; class SubCommands { protected array $subCommands = []; public function __toString() { return join(' ', $this->subCommands); } public function addSubCommand(SubCommand $subCommand): void { $this->subCommands[] = $subCommand; } public function __clone() { $subCommands = []; foreach ($this->subCommands as $subCommand) { $subCommands[] = clone $subCommand; } $this->subCommands = $subCommands; } }