Files
StocksNew/vendor/spatie/backtrace/src/Arguments/ReducedArgument/VariadicReducedArgument.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

22 lines
505 B
PHP

<?php
namespace Spatie\Backtrace\Arguments\ReducedArgument;
use Exception;
class VariadicReducedArgument extends ReducedArgument
{
public function __construct(array $value)
{
foreach ($value as $key => $item) {
if (! $item instanceof ReducedArgument) {
throw new Exception('VariadicReducedArgument must be an array of ReducedArgument');
}
$value[$key] = $item->value;
}
parent::__construct($value, 'array');
}
}