Total Complexity | 3 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
8 | abstract class BehaviorCollection implements BehaviorCollectionInterface |
||
9 | { |
||
10 | use HasLock; |
||
11 | |||
12 | /** @var BehaviorInterface[] */ |
||
13 | private array $behaviors = []; |
||
14 | |||
15 | public function __construct(private readonly TariffTypeInterface $tariffType) |
||
16 | { |
||
17 | } |
||
18 | |||
19 | public function getIterator(): \Traversable |
||
20 | { |
||
21 | return new \ArrayIterator($this->behaviors); |
||
22 | } |
||
23 | |||
24 | public function attach(BehaviorInterface $behavior): self |
||
33 | } |
||
34 | } |
||
35 |