| Total Complexity | 5 | 
| Total Lines | 37 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php  | 
            ||
| 10 | final class Changes implements IteratorAggregate  | 
            ||
| 11 | { | 
            ||
| 12 | /** @var Change[] */  | 
            ||
| 13 | private $changes = [];  | 
            ||
| 14 | |||
| 15 | private function __construct()  | 
            ||
| 17 | }  | 
            ||
| 18 | |||
| 19 | public static function new(): self  | 
            ||
| 22 | }  | 
            ||
| 23 | |||
| 24 | public static function fromArray(array $changes): self  | 
            ||
| 25 |     { | 
            ||
| 26 | Assert::that($changes)->all()->isInstanceOf(Change::class);  | 
            ||
| 27 | $instance = self::new();  | 
            ||
| 28 | $instance->changes = $changes;  | 
            ||
| 29 | return $instance;  | 
            ||
| 30 | }  | 
            ||
| 31 | |||
| 32 | public function withAddedChange(Change $change): self  | 
            ||
| 37 | }  | 
            ||
| 38 | |||
| 39 | /**  | 
            ||
| 40 |      * {@inheritDoc} | 
            ||
| 41 | *  | 
            ||
| 42 | * @return Change[]  | 
            ||
| 43 | */  | 
            ||
| 44 | public function getIterator() : ArrayIterator  | 
            ||
| 49 |