| Total Complexity | 5 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | final class Changes implements TellsWhatChanged |
||
| 12 | { |
||
| 13 | private $added; |
||
| 14 | private $altered; |
||
| 15 | private $removed; |
||
| 16 | |||
| 17 | private function __construct( |
||
| 18 | ListsEntityStates $added, |
||
| 19 | ListsEntityStates $altered, |
||
| 20 | ListsEntityStates $removed |
||
| 21 | ) { |
||
| 22 | $this->added = $added; |
||
| 23 | $this->altered = $altered; |
||
| 24 | $this->removed = $removed; |
||
| 25 | } |
||
| 26 | |||
| 27 | /** |
||
| 28 | * Produces a container of changed state. |
||
| 29 | * |
||
| 30 | * @param ListsEntityStates $added The added entities. |
||
| 31 | * @param ListsEntityStates $altered The altered entities. |
||
| 32 | * @param ListsEntityStates $removed The removed entities. |
||
| 33 | * @return TellsWhatChanged The container with changes. |
||
| 34 | */ |
||
| 35 | public static function wereMade( |
||
| 36 | ListsEntityStates $added, |
||
| 37 | ListsEntityStates $altered, |
||
| 38 | ListsEntityStates $removed |
||
| 39 | ): TellsWhatChanged { |
||
| 40 | return new self($added, $altered, $removed); |
||
| 41 | } |
||
| 42 | |||
| 43 | /** @inheritdoc */ |
||
| 44 | public function added(): ListsEntityStates |
||
| 47 | } |
||
| 48 | |||
| 49 | /** @inheritdoc */ |
||
| 50 | public function altered(): ListsEntityStates |
||
| 53 | } |
||
| 54 | |||
| 55 | /** @inheritdoc */ |
||
| 56 | public function removed(): ListsEntityStates |
||
| 61 |