nix-config/modules/phpactor/config/templates/collection/SourceCode.php.twig
Oliver Davies 703bf836de
All checks were successful
/ check (push) Successful in 55s
Rename modules directory
2025-08-18 11:35:07 +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 %}