nix-config/modules2/phpactor/config/templates/collection/SourceCode.php.twig
Oliver Davies fa0bad904c
All checks were successful
/ check (push) Successful in 1m42s
Move phpactor configuration
2025-07-26 23:21:37 +01:00

22 lines
411 B
Twig

<?php
declare(strict_types=1);
namespace {{ prototype.namespace }};
{% for class in prototype.classes %}
final class {{ class.name }} implements \IteratorAggregate {
public function __construct(private array $items = []) {
}
public function getIterator(): \Iterator {
return new \ArrayIterator($this->items);
}
public function toArray(): array {
return $this->items;
}
}
{% endfor %}