toalett-redis-timeseries/src/Protocol/ProtocolAssembler.php

19 lines
386 B
PHP

<?php
namespace Toalett\Redis\Timeseries\Protocol;
trait ProtocolAssembler
{
protected function appendAll(array $command, string ...$methods): array
{
foreach ($methods as $method) {
if (!method_exists($this, $method)) {
continue;
}
$command = $this->{$method}($command);
}
return $command;
}
}