Commit 4ffbcd20 authored by Jan Kuchař's avatar Jan Kuchař

fix markdown

parent 51aaa246
......@@ -2,7 +2,7 @@
In order state example I would like to demonstrate that there are more then one solution of domain problem of order state which can transition into another states.
## 1. Class constants
## 1. Class constants
[source code](refactoring-1.phpt)
......@@ -28,7 +28,7 @@ Nice thing is that we do not need anymore external service for asking `OrderStat
Remaining problem is that there are still lot of ifs and we still need to handle case where someone adds new value into enum which we do not count with.
## 4. Separate instance for each value
## 4. Separate instance for each value
[source code](refactoring-4.phpt)
......@@ -45,4 +45,4 @@ Now, new domain requirement:
1. I have rewritten each value as separate class (as behaviour is different for different values)
2. I have implemented doTransition() on enum parent class as it is only proper way of changing enum value
3. I have added `onActivation(Order $order)` method, which is called whenever state transition occurs.
3. I have overridden `onActivation()` on enum values with desired behaviour.
\ No newline at end of file
3. I have overridden `onActivation()` on enum values with desired behaviour.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment