| Conditions | 1 |
| Paths | 1 |
| Total Lines | 30 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function __construct(SalesStates $initialStatus) |
||
| 17 | { |
||
| 18 | parent::__construct($initialStatus); |
||
| 19 | |||
| 20 | $transitions = []; |
||
| 21 | |||
| 22 | $transitions[] = new Transition( |
||
| 23 | new SalesStates(SalesStates::NEW), |
||
| 24 | new SalesStates(SalesStates::DEALING) |
||
| 25 | ); |
||
| 26 | |||
| 27 | $transitions[] = new Transition( |
||
| 28 | new SalesStates(SalesStates::DEALING), |
||
| 29 | new SalesStates(SalesStates::WON) |
||
| 30 | ); |
||
| 31 | |||
| 32 | $transitions[] = new Transition( |
||
| 33 | new SalesStates(SalesStates::DEALING), |
||
| 34 | new SalesStates(SalesStates::LOST) |
||
| 35 | ); |
||
| 36 | |||
| 37 | $this->allowedTransitions = $transitions; |
||
| 38 | |||
| 39 | $finished = []; |
||
| 40 | |||
| 41 | $finished[] = new SalesStates(SalesStates::WON); |
||
| 42 | $finished[] = new SalesStates(SalesStates::LOST); |
||
| 43 | |||
| 44 | $this->finishedStatus = $finished; |
||
| 45 | } |
||
| 46 | } |
||
| 47 |